How to use EC2 Auto Scaling and the Application Load Balancer to handle increased load on your app

EC2 Auto Scaling

EC2 Auto Scaling is a feature in EC2 which allows you to maintain the availability of your applications by adding and removing EC2 instances according to some conditions that you define.

In this video we also use an application load balancer which will distribute the load to the EC2 instances. This load balancer has a target group which serve as traffic targets and it is attached to an Auto Scaling Group. Whenever our application is under heavy load this is detected by monitoring CPU usage.

When CPU usage is above 50% this will trigger an Auto Scaling action which will add an instance to our Auto Scaling Group (this is called scaling out). If the load is still high it will add another instance and so on. If the load disappears then instances are removed which is known as scaling in.

Exit mobile version