Auto Scaling

Abimuktheeswaran Chidambaram
4 min readMay 12, 2023

Auto Scaling is used to configure scaling to handle the load for your application. Scaling is the ability to increase or decrease your application’s computing capacity. Auto-scaling benefits are Better availability, Better fault tolerance (span multi AZs within the region), and Better Cost Management. In this article, we see the following topics…

  1. Types of auto-scaling
  2. Auto Scaling Components
  3. Auto Scaling options
  4. Monitoring Your Auto-Scaling Groups

1. Types of auto-scaling:

Vertical Scaling is adding more resources to your server to handle the load for your application. The resources may be CPU, RAM, Storage, etc.

Horizontal Scaling is adding more resources to handle the load for your application. The resources may be nodes (or) computers (or) servers etc.

2. Auto Scaling Components:

2.1 Auto scaling groups are a collection of instances so they can be treated as a logical unit for scaling and management.

2.2 Configuration Templates are specifications of your instances like AMI ID, Key-Pairs, Instance Type, Security Groups, block device mapping, etc.

2.3 Scaling Options are scaling policies like automatic, manual, predictive, scheduling, and fixed.

3. Auto Scaling options:

3.1 Manual Scaling is changing the size of an existing Auto Scaling group manually.

3.2 Dynamic Scaling changes the size of an existing Auto Scaling group Dynamically or automatically based on demand. For Example: Booking a railway ticket during Festival time and normal time. It supports the following policies are

Target Tracking Scaling that increases or decreases the current capacity of the group based on a target value and AWS CloudWatch metric.

Step Scaling increase or decreases the current capacity of the group based on a set of scaling adjustments known as step adjustments. It is based on cloudwatch alarm. You may specify to handle the scaling when the alarm threshold is breached.

Simple scaling that increases and decreases the current capacity of the group based on a single scaling adjustment, with a cooldown period (specifies the time to take effect of previous scaling activity) between each scaling activity.

3.3 Scheduled Scaling is changing the size of an existing Auto Scaling group based on schedule it may be date or time according to predictable workloads. For Example, Traffic is heavy on weekdays (Mon-Fri) and less on weekends (sat-sun). To use schedule scaling, you create scheduled actions. scheduled actions are scheduled for the scaling at your convenience it will be triggered later. For example when a busy period is expected or to save money for your development environment scaling them down outside office hours. It supports one-time scaling and Recurring Scaling actions.

One-time Scaling Actions occur one time only.

If the group has fewer than 4 instances at the date and time specified for --start-time (10:00 AM UTC on Oct 28, 2021) then it scales out to 4 instances.

source: https://aws.plainenglish.io

The recurring is occurring daily basis.

It initiates auto-scaling every Monday through Friday at 10 AM Asia/Calcutta time. If the capacity is below 3, it will increase the desired capacity to 3. If the capacity is higher than 3, it will decrease the desired capacity to 3.

source: https://aws.plainenglish.io

3.4 Predictive Scaling changes the size of an existing Auto Scaling group in Advance based on daily and weekly patterns. It uses an ML algorithm and gets historical data from Cloudwatch for the past 14 days. For Example: Booking railway tickets in Tatkal mode at every morning 11 am.

3.5 Your Auto Scaling group continues to maintain a fixed number of instances even if an instance becomes unhealthy. When it finds that an instance has become unhealthy, it terminates that instance and launches a new one. Amazon EC2 Auto Scaling monitors the health of each Auto Scaling instance periodically.

4. Monitoring your Auto Scaling groups

Health Check Maintains current instance levels at all times. If any instance is unhealthy it checks the health of the instance and replaces the new healthy one. You can be notified when Amazon EC2 Auto Scaling is launching or terminating the EC2 instances in your Auto Scaling group. You manage notifications using Amazon Simple Notification Service (Amazon SNS).

By using the AWS CloudTrail you can track the calls for the AutoScaling application on behalf of your AWS account. These logs are saved in the S3 bucket. These logs are sent to Cloudwatch logs.

--

--