AWS Autoscaling and Amazon Auto Scaling Group

AWS auto Scaling Group

Most of the company is migrating to the cloud because of Scalability, Fault Tolerance, High Availability of resource. AWS Auto scaling Group is one of the most important feature of AWS cloud. 

Scalability or Autoscaling have the same mean. In terms of Cloud Scalability or AWS Autoscaling means based on the requirement scaling the server resource up and down to meet the users request requirement without fault Tolerance and with high availability of resource .

  • AWS Autoscaling is region Specific Amazon services.
  • Auto scaling is a process of scaling (Scale Out[Increase] or Scale In[Decrease]) your EC2 Instance up or down based on the set of condition. 
  • Amazon Autoscaling is Horizontal Scaling of EC2 Resource. This Horizontal scaling ensure that you must have the right number of server to handle the Request.
  • Auto Scaling help in the cost Management. In cost management Auto scaling don't have extra charge for creating instance in AWS ASG.
  • Instance Running only you can include in Autoscaling Group. Terminated or Stopped Instance can't be included in ASG Group. 
  • EC2 instance can be the part of only one Auto scaling Group. It can't be the part of Multiple auto scaling Group. You can have multiple AWS ASG but we can't attach single EC2 Instance in multiple ASG.
  • When you want to delete the AWS Auto scaling group first you have to detach the Existing EC2 of that particular ASG and then you can delete it.  If you delete the ASG without detaching the EC2 instance then it will delete the EC2 Instance also.
  • We can attache multiple Elastic Load balancer with auto scaling group. 
  • Whenever you apply Scale-Out Policy you must apply Scale-in Policy also. Other wise your cost will come high.
  • If you are creating AWS ASG using CLI then the basic monitoring will be 60 second. But if you are using console then the basic monitoring time will be 300 second (5 min). Through CLI by default it will be detailed monitoring will be created which is chargeable. Basic Monitoring is free of cost.
  • Merging of AWS ASG is possible only through CLI(Command Line Interface).

Component of AWS Autoscaling


Launch Configuration : In launch Configuration we define the type of instance, Key pair, AMI, Security Group. Once the Launch configuration is created after that you can't edit it. You can only delete it or Copy it.

Auto Scaling Group : Here we define the AWS ASG name, group Size, Group Subnet , vpc etc.

Scaling Policy : Metric Type, Target Value

Autoscaling Group always try to balance the EC2 Instance distribution across Region AZ's. Because if it is not balanced then in case of any failure of AZ's the load will come to the other AZ's for short time. To avoid that AWS Autoscaling Group distribute instance equally in multiple AZ's in that region itself (Autoscaling is Region Specific.). Below is the image as a example.


SNS (Simple Notification Services) in Auto Scaling Group sends email in four condition  which is below for your reference. SNS is chargeable services.

  • An Instance Is Launched
  • An Instance is terminated
  • An Instance is fail to launch
  • An Instance is fail to terminate 

Amazon Auto Scaling Policy

  • Manual AWS Auto Scaling Policy ( In this scaling Policy the Min and Max Number of server will be same in all the condition.)
  • Dynamic AWS Auto Scaling policy ( In this scaling Policy the Min and Max Number of server will not be same and based on the condition it increase within the min and max range)
    • Target Tracking Policy : In this policy we define the target. To maintain that target AWS ASG will increase or decrease the EC2 Instance. Like we are setting the target that one EC2 instance can have 70% of traffic. If that traffic will cross 70% automatically new EC2 instance will be launched. Target Tracking Policy always maintain the level of 70%. If it traffic decreases across all the Instance then it will terminate the EC2 instance and bring down the instance. In this we define or set the CPU Utilization. Below is the Image where target Tracking Policy we set.
      AWS ASG Target Tracking Policy
       
    • Simple Scaling Policy :
    • Step Scaling Policy :  We have to set Increase and decrease group Size as well as we have to the alarm before applying this scaling policy.
    • Predictive Scaling / Schedule Scaling / Cyclic Scaling : Predictive scaling will check the traffic history and based on the history it will scale up and down. Or we can decide like Scale Out on Saturday and Sunday. It uses machine learning Help and help in Scaling Out and In

No comments:

Post a Comment

Our Feature Post

There is a tree between houses of A and B If the tree leans on As House

    There is a tree between houses of A and B. If the tree There is a tree between houses of A and B. If the tree leans on A’s House, the t...

Our Popular Post