AWS Step Auto Scaling Policies
Amazon Web Services has introduced Step Autoscaling Policies for the autoscaling of EC2 instances. These policies are much different from the Simple Autoscaling Policies which are being used till the date. The cooldown periods are not supported in the Step Scaling Policies. It let you define lower bound , upper bound for metric values and the amount by which to scale in or scale out the instances.
In Simple Autoscaling Policy, you define the threshold value and upper bound. The alarm monitors the metric values. When the metric value breaches the threshold, the scaling policy acts. The instances are added or removed as per the policy. The Amazon Web Services has modified the Autoscaling Policies and new features have been introduced. It now lets you scale in and scale out your instances in percentage terms of the running instances. You can now define multiple scaling policies in a single AutoScaling Policy based on your metric values.
In this figure, you can see there are multiple actions in the AutoScaling Policy. For example, it has been defined to add 1 instance when CPU Utilization is between 40%-50%. It will add 2,3,4 instances to 50%-70%,70%-90%,90%-infinity CPU utilization respectively. You can also define to increase or decrease instances in percentage of the number of instances. Thus, this new policy lets us define different metric value comparisons in contrast to the previous Simple AutoScaling Policy.
In the same way we can define the Scale down policies for AutoScaling groups. We can also define the duration which the new instances will need to warm up. Thus, the new policy will act only after the previous policy passes down the warmup period of the instances.
We had a use case few days ago and the same time Amazon introduced this new Step Scaling Policy. We usually had one AutoScaling Policy in which we scaled out and scaled in instances using only a particular condition. The main drawback was that our traffic was unpredictable and it used to change in few seconds from very high to low or vice-versa. The step scaling policy is very helpful in this case.
HOW TO CREATE AWS STEP AUTO SCALING POLICY:
- Login to your AWS console and go to AutoScaling Groups in EC2 service. The console window will appear as shown below:
- Click on Create Auto Scaling Group to start creating your AWS Auto Scaling Group. The next window will appear as shown :
- Click on Create launch configuration to create the launch configuration. The launch configuration must be created before any Auto Scaling Group.
- Specify the details and create the Launch Configuration file. You can check the detailed information for creating it here at AWS website: Create Auto Scaling Group AWS. After creating it, create Auto Scaling Group.
- After specifying the details of Auto Scaling Group, you will get the console window of newly introduced policy. The window will appear as follows:
- You can specify whether to add instances or percentage of instances depending upon your scalability needs. You can choose either AWS Simple Scaling Policy or AWS Step Scaling Policy.
The complete details about creating AWS Step Auto Scaling Policies has been detailed above.
Thank you for sharing this useful information, As I am fresher to this field It really helped me to learn about the subject clearly. Thanks for sharing.