Auto Scaling is an Amazon Web Services it allows instance scalable when the traffic increases or CPU load increases. Auto-scaling is a service monitoring all instances that are configured into the Auto Scaling group and it ensures that loads are balanced in all instances.
Depending on the load scaling group increase the instance according to the configuration. When we create the Auto Scaling Group we configured the Desired capacity, Minimum capacity, or Maximum capacity and also configured CPU utilization. If CPU utilization increases by 60% in all instances then one more instance create and if CPU utilization decreases by 30% in all instances then terminate one Instance. These are setting totally up to us what is our requirement. If any Instance fails due to any reason then the Scaling group maintains the Desired capacity and starts another instance.
The Auto Scaling group follows Horizontal Scaling. This service is very important for us nowadays because we do not need to create new instances manually and do not require monitoring manually.
Steps to Setup the Auto Scaling Group in EC2
Step 1: Click on the All Services.
Step 2: Click on the EC2.
Step 3: Scroll Down and click on the Launch Templates and click on the Create launch template
Step 4: Type the Template name.
Step 5: Select the Amazon Machine Image.
Step 6: Select the Instance Type and Key pair.
Step 7: Select the Security Group or Create the new one.
Step 8: Click on the Create Launch Template.
Step 9: Now you can see the template is created. Now, scroll down and click on the Auto Scaling Groups.
Step 10: Click on the Create Auto Scaling group.
Step 11: Type the Auto Scaling group name.
Step 12: Select your Template.
Step 13: Select the VPC or go with the default VPC and also select the Availability zone.
Step 14: Configure the Group size and Scaling policies.
Select as per your requirement:
- Desired: 4
- Minimum: 4
- Maximum: 8
Step 15: Select the Target tracking scaling policy.
Step 16: Click on the Create Auto Scaling Group.
- Now you can see the Auto Scaling is creating and it is also creating the desired state of the EC2 Instance
- We selected the Desired state equal to 4 and you can see the 4 Instance is Running
No comments:
Post a Comment