Intro to Kubernetes Event-Driven Autoscaling (KEDA)
Tim Nichols
CEO/Founder

TLDR: KEDA enhances Kubernetes horizontal autoscaling by enabling workloads to scale on custom metrics and event triggers. This means your autoscaling can be more accurate, responsive, and applied to more diverse workloads. In this post we introduce KEDA and explain why it’s so important to platform teams.
What is KEDA
KEDA is a lightweight add-on that enhances horizontal autoscaling on Kubernetes. Specifically it enables …
- Event Driven Scaling based on reactive or deterministic (batch, push notification) triggers.
- Scaling on custom metrics (ex: Queuesize) that are more accurate and responsive measure of load than Memory and CPU metrics.
Installing KEDA means more types of workloads can enjoy the benefits of horizontal autoscaling: improving reliability and reduced costs.
KEDA is a graduated CNCF project with superb community and continuous innovation. For example, the recent GA release of Scaling Modifiers gives you new tools to manage AI workloads.
How KEDA Works
KEDA is a single-purpose, lightweight add-on that introduces three new components to your clusteR:
- KEDA operator scales workloads to/from 0 replicas. It works with Kubernetes Deployments, Jobs, StatefulSets or any custom resource that defines a /scale subresource.
- Metrics server exposes external metrics to Horizontal Pod Autoscaler (HPA) so that you can scale from 1 to N replicas. For example, the messages in a Kafka topic.
- Admission Webhooks to validate resource changes, prevent misconfigurations, and enforce best practices.
KEDA architecture (via keda.sh)
KEDA is a pretty easy install, the main challenge is picking and tuning the right scaler for each workload.
KEDA Scalers and Event Sources
KEDA scalers are pre-made adapters that allow your HPA to read from a metrics source.
KEDA comes with 70+ scalers from standard open source databases (Prometheus, RabbitMQ), Managed Cloud Services (AWS SQS) and major observability vendors like Datadog.
KEDA also has external scalers for more advanced or custom functionality. These act as a custom gRPC server with fully customizable logic.
Technical benefits of KEDA
Scaling on Custom Metrics means your workloads can scale on the metrics which represent ‘true’ load - not just CPU and Memory metrics. KEDA acts as a metrics adapter that fetches and authenticates external metrics for the native HPA to process. You could create your own custom metrics broker for HPA that’s what KEDA is for.
Scaling on true load (like RequestRate or QueueLength) results in more responsive and accurate scaling behavior. Reducing costs and avoiding cold starts.
It also means you can extend the benefits of autoscaling to more diverse types of workloads (ex: a queue consumer).
In our experience, scaling on custom metrics is the #1 reason teams migrate from HPA to KEDA
Event-Driven Scaling unlocks clever things like scaling based on push notifications so that you can respond to deterministic or scheduled workloads.
Scaling to Zero highlights the importance of the KEDA Operator. Unlike HPA, KEDA can scale workloads to and from zero pods.
Flexible Scaling Logic with cooldown periods, custom triggers and scaling modifiers make KEDA superior for scaling production workloads
Why Platform Engineering Teams need KEDA
We recommend that platform and infrastructure teams start their autoscaling journey with KEDA on day 1.
- You want all ‘real’ production workloads to enjoy the benefits of autoscaling: improved reliability and reduced costs.
- You don’t want to stitch together multiple solutions for different types of workloads: VPA for some workloads, Cron for data/batch, HPA for others, and KEDA for Queues
- KEDA allows you to build an autoscaling strategy for all of your Kubernetes workloads, so it’s the natural tool to template autoscaling for each workload.
Use Flightcrew to safely automate KEDA
Flightcrew is an AI Tool that catches and fixes incorrect and unoptimized configuration.
You can use Flightcrew to analyze your Kubernetes clusters and generate personalized pod, node and scaling configs - including KEDA.
Flightcrew analyzes metrics, architecture, frameworks and dependencies so it can help you short-cut the process of picking, deploying and tuning the correct scaler for each workload.
Tim Nichols
CEO/Founder
Tim was a Product Manager on Google Kubernetes Engine and led Machine Learning teams at Spotify before starting Flightcrew. He graduated from Stanford University and lives in New York City. Follow on Bluesky