Autoscaling
Autoscaling automatically adjusts compute capacity based on metrics or schedules, implementing elasticity to balance performance and cost.
Autoscaling is the mechanism that automatically changes how much compute capacity a workload runs, in response to demand. It adds instances, containers, or pods when load rises and removes them when load falls, keeping performance acceptable while avoiding paying for idle capacity. Autoscaling is how cloud elasticity is put into practice.
How It Works
Autoscaling can be reactive, predictive, or scheduled. Reactive scaling watches metrics such as CPU, memory, request latency, or queue length and adjusts capacity when thresholds are crossed. Predictive scaling uses historical patterns or machine learning to provision ahead of expected demand. Scheduled scaling changes capacity at known times, such as scaling up before business hours. Two dimensions exist: horizontal scaling adds or removes instances, and vertical scaling resizes an instance's resources. In Kubernetes, the Horizontal Pod Autoscaler, Vertical Pod Autoscaler, and Cluster Autoscaler each handle a different layer. Cooldown periods and minimum and maximum bounds prevent thrashing and runaway cost.
Why It Matters
Autoscaling lets systems absorb traffic spikes without manual operations and lets teams right-size for normal load instead of peak. This improves both resilience and cost efficiency. Poorly tuned autoscaling can react too slowly, oscillate, or scale on the wrong metric, so choosing meaningful signals and testing under realistic load is important. Stateless application design and fast instance startup make autoscaling far more effective.
Related Terms
Autoscaling implements elasticity, works hand in hand with load balancers, and is built into serverless platforms.