Skip to content

Amazon EC2 Auto Scaling

#38 · Level 2 · Scaling and resilience · Scaling and traffic

Amazon EC2 Auto Scaling automatically increases or decreases the number of servers based on load. EC2 instances are kept in an Auto Scaling group, which has a minimum, maximum and desired number of instances. What new instances look like is set with a launch template. When to scale up or down is decided by a scaling policy, for example by looking at CPU usage in CloudWatch. When it is connected to a load balancer, new instances start receiving traffic automatically.

Before Eid, a shopping mall hires extra salespeople, and after Eid it lets them go. Auto Scaling does this on its own, minute by minute.

Running too many servers all the time wastes money; running too few means the site goes down when it gets busy. Auto Scaling keeps the balance between the two. If a server fails, it starts a new one in its place.

For the EC2 servers behind a load balancer. You give it rules, such as “if the servers are very busy, add one; if they are idle, remove one.”

Azure Virtual Machine Scale Sets

Elastic Load Balancing · Amazon EC2 · Amazon CloudWatch

For details and the latest information, see the official documentation: