Auto Scaling
Auto scaling is a cloud capability that automatically adjusts the number of running compute instances up or down in response to demand, based on defined metrics or schedules, to maintain performance while minimizing unnecessary cost.
Definition
Auto scaling is a cloud capability that automatically adjusts the number of running compute instances up or down in response to demand, based on defined metrics or schedules, to maintain performance while minimizing unnecessary cost.
Overview
Auto scaling solves a fundamental tension in running infrastructure: provisioning for peak demand wastes money during quiet periods, while provisioning for average demand causes outages during spikes. Instead of picking one fixed capacity, an auto scaling group monitors a metric — commonly CPU utilization, request count, or a custom application metric published to a service like AWS CloudWatch — and automatically launches new instances when demand rises, or terminates instances when it falls, all within configured minimum and maximum bounds. Scaling policies generally fall into a few categories: target-tracking policies keep a metric near a set target (for example, "keep average CPU at 50%"); step scaling adds or removes a specific number of instances based on how far a metric has crossed a threshold; and scheduled scaling anticipates predictable patterns, like scaling up ahead of a known daily traffic peak or scaling down over a weekend. New instances launched by an auto scaling group are typically registered automatically behind a load balancer, so traffic is distributed across the current fleet without manual intervention. Auto scaling isn't limited to virtual machines — Kubernetes has its own equivalents (the Horizontal Pod Autoscaler for scaling pod replicas, and the Cluster Autoscaler for scaling nodes), and Function as a Service (FaaS) platforms take the idea to its extreme with automatic, near-instant scale-to-zero. Together with Reserved Instances and Spot Instances, auto scaling is one of the primary levers teams use to balance reliability against cost, and it's a core theme in most cloud architecture and FinOps discussions.
Key Concepts
- Automatically launches or terminates instances based on real-time metrics
- Target-tracking, step scaling, and scheduled scaling policy types
- Configurable minimum, maximum, and desired capacity bounds
- Integrates with load balancers to register and deregister instances automatically
- Health checks replace unhealthy instances automatically
- Equivalent mechanisms exist for containers (Kubernetes HPA) and serverless platforms
- Reduces cost by matching capacity to actual demand instead of fixed provisioning