What Is Autoscaling
Autoscaling Defined
Autoscaling is a cloud feature that adds or removes computing resources automatically, based on rules and measured demand. Instead of an administrator resizing servers by hand, the platform watches a metric, such as average CPU use, and starts or stops servers to keep that metric within a target range.
Most autoscaling is a form of horizontal scaling. It adds and removes identical servers, called instances, rather than changing the size of one server. An instance is a single virtual server running in the cloud.
The Parts of an Autoscaling Setup
- Scaling group: the set of identical instances and the template used to create new ones.
- Metric: the measurement that triggers a change, such as CPU use, request count or queue length.
- Policy: the rule that links a metric to an action, for example "add two instances when average CPU stays above 70 percent for five minutes."
- Minimum and maximum size: limits that stop the group from shrinking to nothing or growing without bound.
- Cooldown: a waiting period after a change, so the system does not react twice to the same spike.
The size of each instance is a separate decision, covered in instance types. Autoscaling only decides how many instances run.
Cost Effects and Timing Limits of Autoscaling
Autoscaling can lower bills because the group shrinks when traffic is low, so fewer servers run overnight. It can also raise them. A bug that inflates a metric, or a flood of automated traffic, can launch many instances before anyone notices. Setting a sensible maximum size and spending alerts limits this risk.
Autoscaling also takes time. New instances need minutes to start, and the application must load before it can serve users. The group therefore reacts after demand has already risen. Teams with predictable peaks often schedule extra capacity in advance rather than relying only on reactions.
Frequently asked questions
Does autoscaling work for databases?
Only partly. Stateless web servers and background workers scale out easily. Databases hold data that must stay consistent across copies, so adding nodes is harder. Many teams autoscale the application layer and use managed database features, such as read replicas (copies that answer read-only queries), to handle extra load.
Which metric should autoscaling use?
There is no single right metric. CPU use is common and simple to understand. Request rate or queue length often reflects demand more closely for web servers and background jobs. The best choice is the measure that rises and falls with real load on your application.
Is autoscaling the same as load balancing?
No. Autoscaling changes how many servers exist, while a load balancer decides which server receives each request. The two usually work together: the load balancer sends traffic to the instances the autoscaler has started and stops sending traffic to any that fail health checks.