Autoscaling
Adding and removing servers automatically as demand goes up and down.
Autoscaling is a cloud feature that changes the number of servers running an application on its own, based on how busy it is. When traffic rises, it adds copies (scaling out); when traffic falls, it removes them (scaling in). A load balancer in front spreads requests across whatever copies exist at the moment.
You set the rules: keep average CPU around 50%, never run fewer than two servers or more than twenty, add capacity every weekday at 8 a.m. before the rush. The system watches metrics like CPU, memory, request count or queue length and acts when they cross the line. On AWS this is done with Auto Scaling groups for EC2; Kubernetes does the same for containers, and serverless platforms like AWS Lambda scale by themselves without any of this setup.
The point is to pay for what you use without falling over at the peak. A ticket site can run a few servers at night and dozens when a big concert goes on sale. It only works well if the app is designed for it: any copy must be able to handle any request, with no important data kept only on one server, and new copies must start quickly. Scaling also takes time, so a sudden spike can still hit before new servers are ready.
Keep in mind
- Adds servers when load rises and removes them when it falls.
- Driven by rules on metrics like CPU, requests or queue length, plus minimums and maximums.
- Works with a load balancer and apps where any copy can serve any request.
- New capacity takes time to start, so sudden spikes still need headroom.
Go deeper
- What is Amazon EC2 Auto Scaling? (AWS docs)
- Autoscaling workloads (Kubernetes docs)
- Autoscaling on Wikipedia