Container Compute Service (ACS) provides ACK KEDA to enable event-driven autoscaling capabilities, which are applicable to scenarios such as offline audio and video transcoding, event-driven jobs, and stream data processing. This topic introduces the concept and principles of event-driven autoscaling.
Overview
For Kubernetes, Horizontal Pod Autoscaler (HPA) is the most commonly used solution for automatically scaling pods. HPA determines scaling strategies based on the differences between resource usage and predefined thresholds. HPA is an easy-to-use tool that supports various resource metrics. However, it does not support real-time scaling. For example, HPA cannot scale resources when specific events are detected.
How event-driven elasticity works
ACS provides event-driven autoscaling capabilities through an enhanced version of ACK KEDA. The following figure shows the basic principles of ACK KEDA.
ACK KEDA periodically consumes data from event sources. When pending messages increase, ACK KEDA is triggered to scale a batch of jobs within seconds. After the next period starts, the next batch of jobs is asynchronously scaled. ACK KEDA supports the following features:
Supports various event sources
ACK KEDA supports data sources such as Kafka, MySQL, PostgreSQL, RabbitMQ, and MongoDB.
Controls the concurrency of jobs
When many jobs are submitted, the stability of the underlying control system is adversely affected because the system must holistically control resources, quotas, and API requests. ACK KEDA can control the concurrency of jobs in one or more batches to ensure system stability.
Clears metadata after jobs are completed
A large amount of metadata is retained after many jobs are completed. The accumulation of metadata can reduce the stability of the API Server, resulting in decreased cluster performance, insufficient stability, and potential impact on other services. ACK KEDA can automatically clear metadata after jobs are completed.