
by Josef Karasek
October 27, 2026
KEDA’s Kafka scaler turns a consumer group’s message backlog, meaning messages that have arrived in Kafka but have not yet been processed, into a Kubernetes scaling signal. Kafka calls this backlog consumer lag. When it grows, KEDA adds consumers; when it clears, KEDA removes them. At higher ScaledObject counts, however, measuring the backlog can create its own broker workload.
Every standard kafka trigger independently opens and manages its own connections to Kafka. With 50 ScaledObjects targeting the same cluster, the operator creates 50 separate connection sets. Each one repeatedly asks Kafka for cluster and topic information, the latest message positions, and its consumer group’s progress. Any one poll is inexpensive; repeating much of the same work across every ScaledObject is not.
The new Kedify Kafka Scaler calculates lag the same way and accepts the same Kafka configuration, while allowing compatible ScaledObjects to share connections and avoid duplicate lookups. In our 50-ScaledObjects benchmark, it reduced Kafka connections by 89.9%, metadata requests by 97.3%, and scaler-related Kafka request traffic by 27.0%.
On each polling cycle, a Kafka scaler needs three categories of information:
Within one scaler, requests for partitions served by the same Kafka server can be grouped together, which avoids some duplicate network calls. Separate scalers cannot share those groups, so with 50 ScaledObjects the operator still repeats the same metadata lookup 50 times and asks for the latest message positions 50 times, even when every trigger targets the same topic.
Connections amplify the problem. Each scaler maintains its own Kafka connections and local topic information. A temporary server or authentication error can also cause multiple scalers to reconnect at once, turning one interruption into a wave of new connections and repeated requests.
This is a density problem rather than a Kafka lag problem. The scaling calculation is still correct, but its fixed cost grows with the number of triggers.
The Kedify Kafka Scaler is a separate trigger type, so installing or upgrading Kedify does not change the behavior of existing kafka triggers. Teams can decide where the efficiency gains matter, adopt the new scaler one workload at a time, and compare broker and operator metrics before expanding the rollout.
Both trigger types can run in the same installation. This makes it practical to start with a busy Kafka cluster or a representative group of ScaledObjects while leaving other workloads untouched. Rolling back is equally straightforward: switch the trigger type back to kafka.
The configuration contract remains familiar. Moving an eligible ScaledObject requires changing the trigger type, not redesigning its scaling policy:
apiVersion: keda.sh/v1alpha1kind: ScaledObjectmetadata: name: orders-consumerspec: scaleTargetRef: name: orders-consumer pollingInterval: 5 minReplicaCount: 0 maxReplicaCount: 20 triggers: - type: kedify-kafka metadata: bootstrapServers: kafka-0.kafka:9092,kafka-1.kafka:9092,kafka-2.kafka:9092 consumerGroup: orders-workers topic: orders lagThreshold: '100' offsetResetPolicy: latestAuthentication through TriggerAuthentication and the existing Kafka metadata options continue to work as they do for the standard scaler. No pooling-specific metadata field is required, so teams get lower connection and request overhead without another set of tuning controls to operate.

Running Kafka autoscaling at scale?
Talk with the KEDA maintainers at Kedify about reducing broker and operator overhead.
Get StartedWe tested four versions of the implementation on AKS:
kafka scaler behaviorThe workload used 50 Kafka ScaledObjects against one topic on a three-broker Kafka cluster with 96 partitions. Every ScaledObject polled every five seconds. We allowed a 120-second warmup, measured for 600 seconds, and sampled Prometheus every five seconds.
| Metric | Baseline | Kedify Kafka | Change |
|---|---|---|---|
| Kafka connections | 206.0 | 20.7 | -89.9% |
| Metadata requests/s | 10.16 | 0.278 | -97.3% |
| Scaler-related requests/s | 50.15 | 36.62 | -27.0% |
| All Kafka requests/s | 85.94 | 72.41 | -15.8% |
| Operator memory | 53.15 MiB | 44.83 MiB | -15.7% |
Values are means from the measured 600-second windows.
The new scaler is designed for dense installations: many ScaledObjects connecting to the same Kafka cluster with compatible settings. That includes platforms where teams use different consumer groups but share brokers, TLS material, authentication, and Kafka version.
The benefit is smaller when there is only one Kafka trigger or every trigger uses different credentials, broker sets, TLS material, or Kafka versions. Topic-scoped metadata for different topics also requires separate clients. Workloads dominated by per-consumer-group offset requests will retain more of their original request rate because those queries cannot be safely combined.
Choose based on your deployment:
kafka when you want the existing isolated-client behavior.For large-scale platform environments, this Kafka optimization complements Kedify’s multitenant KEDA and multi-cluster scaling capabilities: tenant-aware isolation within clusters and consistent autoscaling across a fleet.