Skip to main content

KEDA External Scaler

The Sawmills implementation provides a powerful bridge between OpenTelemetry (OTel) and KEDA, enabling dynamic scaling based on OTel metrics. This implementation offers a flexible and efficient way to scale your applications based on custom metrics collected through OpenTelemetry.

Architecture Overview

The implementation consists of three main components:
  1. Receiver: Implements the OTLP Receiver specification, running a gRPC server (default port 4317) that receives and processes incoming metrics.
  2. In-Memory Metric Storage: A high-performance in-memory storage system that maintains recent metric measurements for each metric vector. Key features include:
    • Automatic cleanup of stale measurements
    • Label-based querying support
    • Optimized for real-time metric processing
  3. External Scaler: Implements the KEDA External Scaler contract, running a gRPC server (default port 4318) that queries the metric storage and communicates with the KEDA operator.

Installation

Prerequisites

  • Kubernetes cluster
  • KEDA installed
  • Helm 3.x

Step 1: Install KEDA

Step 2: Configure Sawmills Collector with KEDA Scaler

Create a values.yaml file with the following configuration to enable KEDA scaler and external scaling:
Note: The chart derives the KEDA scaler service address from the rendered scaler service name and the Helm release namespace. Avoid hardcoding a namespace in scalerAddress, especially when deploying through an umbrella chart or using resourceBaseName.