DEV Community

Cover image for Amazon EC2 Auto Scaling
Parth Rewoo
Parth Rewoo

Posted on

Amazon EC2 Auto Scaling

Scalability refers to starting with only the resources you need and designing your architecture to automatically respond to changing demand by scaling out or in. As a result you don’t have to worry about a lack of computing capacity to meet your customers’ needs.

The AWS service that provides this functionality for Amazon EC2 instances is Amazon EC2 Auto Scaling.

Alt Text

Amazon EC2 Auto Scaling

Consider a scenario in which you’ve tried to access a website that wouldn’t load and frequently timed out, the website might have received more requests than it was able to handle.

Amazon EC2 Auto Scaling enables you to automatically add or remove Amazon EC2 instances in response to changing application demand. By automatically scaling your instances in and out as needed, you are able to maintain a high application availability as well as you pay for only the resources you use.

Alt Text

There are three approaches for using Amazon EC2 Auto Scaling -

  1. Dynamic Scaling - Responds to changing demand.

  2. Predictive Scaling - Automatically adds or removes the right number of Amazon EC2 instances based on predicted demand.
    Alt Text

  3. Scheduled Scaling - Allows you to scale your application prior to known load changes.
    Alt Text

When you create an Auto Scaling group, you can set three types of capacities for number of Amazon EC2 instances.

  1. Minimum Capacity - It is the number of Amazon EC2 instances that launch immediately after you have created the Auto Scaling group.

  2. Desired Capacity - It is the number of Amazon EC2 instances that you desire to have in your architecture. If you do not specify the desired number of Amazon EC2 instances in an Auto Scaling group, the desired capacity defaults to your minimum capacity.

  3. Maximum Capacity - It is the maximum number of Amazon EC2 instances that the Auto Scaling group can scale out in response to increased demand.

Alt Text

Benefits of using Amazon EC2 Auto Scaling

  1. It can detect when an instance is unhealthy, terminate it, and replace it with a new one, improving the fault tolerance of application.
  2. It ensures that your application always has the right amount of compute capacity.
  3. It adds instances only if needed, and may scale across purchase options to optimize performance and price.

Alt Text

Please feel free to write @ rewooparth.rp@gmail.com for any queries on Amazon EC2 Auto Scaling & stay tuned for next write-up.

Thank you!

Top comments (0)