What is Auto Scaling in AWS ?

What is Auto Scaling in AWS ?

Auto Scaling in AWS is a service that helps the user to monitor applications and automatically adjusts the capacity to maintain steady, predictable performance at the lowest possible cost.

Auto Scaling in AWS is a new AWS service that helps you optimize the performance of your applications while lowering infrastructure costs by easily and safely scaling multiple AWS resources.

It simplifies the scaling experience by allowing you to scale collections of related resources that support your application with just a few clicks.

Auto Scaling in AWS helps you configure consistent and congruent scaling policies across the full infrastructure stack backing your application.

Auto Scaling in AWS will automatically scale resources as needed to align to your selected scaling strategy, so you maintain performance and pay only for the resources you actually need.

The goal of an Auto Scaling Group (ASG) is to:

Scale out: add EC2 instances to match an increased load

Scale in: remove EC2 instances to match a decreased load

Ensure we have a minimum and a maximum number of machines running

Automatically Register new instances to a load balancer.

auto scaling groups

Benefits of Auto Scaling in AWS:

Auto Scaling your application leads to the following benefits:

  • Better fault tolerance
  • High availability of resources
  • Better cost management
  • High reliability of resources
  • The high flexibility of resources

Auto Scaling Groups – Scaling Policies:

1) Target Tracking Scaling

Most simple and easy to set-up

Example: I want the average ASG CPU to stay at around 40%

2) Simple / Step Scaling:

This scaling plan lets the user define parameters that control the scaling procedure such as CPU utilization, memory, etc.

When a CloudWatch alarm is triggered (example CPU > 70%), then add 2 units

When a CloudWatch alarm is triggered (example CPU < 30%), then remove 1

3) Scheduled Actions:

This scaling plan comes in handy in situations where the user can predict when the traffic on the application is going to increase. In such cases, the user can schedule the time when AWS auto scaling should be executed.

Anticipate a scaling based on known usage patterns.

Example: increase the min capacity to 10 at 5 pm on Fridays.

Auto Scaling Groups – Scaling Cooldowns:

The cooldown period helps to ensure that your Auto Scaling group doesn’t launch or terminate additional instances before the previous scaling activity takes effect.

In addition to default cooldown for Auto Scaling group, we can create cooldowns that apply to a specific simple scaling policy

A scaling-specific cooldown period overrides the default cooldown period.

If the default cooldown period of 300 seconds is too long—you can reduce costs by applying a scaling-specific cooldown period of 180 seconds to the scale-in policy.

If your application is scaling up and down multiple times each hour, modify the Auto Scaling Groups cool-down timers and the CloudWatch Alarm Period that triggers the scale in.

ASG for Solutions Architect -Launch Template vs Launch Configuration

Both uses ID of the Amazon Machine Image (AMI), the instance type, a key pair, security groups, and the other parameters that you use to launch EC2 instances (tags, EC2 user-data…)

Launch Configuration (legacy): Must be re-created every time.

Launch Template (newer): Can have multiple versions, create parameters subsets (partial configuration for re-use and inheritance), Provision using both On-Demand and Spot instances (or a mix), Can use T2 unlimited burst feature, Recommended by AWS going forward. So whenever the certification asks questions regarding Launch configuration/ Template then think mostly in point of launch Template.

Related Posts:

Amazon Web Service – AWS Tutorial

Top 13 Reasons to Why Learn AWS in 2022

What is AWS EFS (Elastic File System) ?

What is Amazon API Gateway? Benefits, Features of Amazon API Gateway

AWS VPC – Amazon Virtual Private Cloud || Benefits & Components

What is Elastic Load Balancer (ELB) in AWS?