Kubernetes Event Driven Autoscaling

- KEDA

You can scale your application based on CPU or memory usage. However, consider a scenario where your application consumes messages from a Kafka topic or an Azure Event Hub and is deployed as a standard Kubernetes deployment. In such cases, memory or CPU may not be the primary limiting factors, but rather the number of events or messages consumed per second or the overall throughput. This is where Kubernetes Event-driven Autoscaling (KEDA) proves to be beneficial.

KEDA fetches metrics from the external service (Event Hub, etc.) and dynamically scales in or out the container instances based on the observed metrics. The advantage of this approach is that if there are no events or messages to be processed, KEDA can scale down to zero instances, effectively eliminating infrastructure costs. For more info, see keda.sh