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

AWS Route 53 DNS and Amazon Route53 Hosted zone

AWS Route 53 and DNS Management

AWS Route 53 is mainly for 

A) DNS Management
B) Traffic Management
C) Availability Management (Server Health Check)
D) Domain Registration

DNS (Domain Name Server) it's like a phone-book. It actually translate the Domain name in to IP address. Whatever the Device is connected with the internet have the Unique IP which we cant remember easily. So that's why Name came in picture. DNS will translate that name to IP Address.

For Example :

website: www.example.com have the Unique IP 111.111.1.11. Whenever any request comes using the www.example.com DNS will translate it into the respective IP.

Port Number is used to identify the specific process or request comes via internet or network and it forward to the server for further processing. Port 53 sets a communications protocol for the Internet network layer, transport layer, and session layer. Name server basically route the traffic to the server.

Route 53 name server function


Why Named Amazon Route53?


Route53 which manages our DNS runs on port number 53. Any request comes to Route 53 it will translate the Web address to specific IP address for further communication with the server. 

We can perform all sort of task using Route53 Hosted Zone such as DNS Management, Domain name Registration, Domain transfer, Server health check and traffic management etc.

Points to Remember about Amazon Route53:

  • Route53 is Global Services like IAM.
  • Route 53 supports IPV6 also. AWS Provide two type of domain one is Generic Top level domain(.com, .net, .org etc) and second one is Geographic Top level domain(.in, .uk, .us etc)
  • Multiple Hosted zones can be created with the same name but the name server inside the hosted zone will be different. 
  • Route 53 assign four name server to hosted zone which will be different and unique.
  • SOA (Start of Authority) will contain the information about the hosted zone what you create.
  • Transfer of Domain is possible between two AWS account for that you must contact The AWS Support.
  • When you migrate domain name from one AWS Account to other AWS Account in that case only domain get transferred not Route53 hosted zone.

AWS Route53 Function request handling  


AWS Route 53 dns resolver


There is two type of hosted Zone, Public and Private Hosted Zone. Whenever we create or register a  domain using Route 53 at that time Four  name server and one SOA(Start of Authority) is created automatically.

Supported Route 53 DNS Record Type


A Record(IPV4): It map the Domain name to IP Address (IPV4 which is 32 bit).

AAAA Record(IPV6):  It map the Domain name to IPV6 Address (IPV6 Which is 128 bit)

CNAME Record (Canonical Name Record) : It  will point the different URL format to the registered URL.You cant create the CNAME for the top domain (Main Domain).

Example:  example.com, www.example.com, http://example.com all are same this all canonical name must point to single domain what you wish among the list. 

amazon route53 hosted zone









NS Record :  Which point to your server or name server or Domain name server is same.

SOA (Start of Authority) : SOA contain all the information about the Domain owner, changes made in the hosted zone. It contain the authoritative server detail.

MX Record: MX Record maintain the record of mail created using the mail. example info@example.com

Route 53 Hosted Zone Policy

  • Simple Routing(By Default) : Simple Routing is very simple routing policy. At the time of creating record set if we don't select routing policy by default it will be assigned.  
  • Failover Routing : In this Failover Routing Policy we create two server one as a primary server and second as a standby server. Initially all the request will be sent to the primary server in case of primary server failure the standby server will be activated and the request will be serve by standby server.  
  • Geolocation Routing : This Routing we apply when we have server in various location. Like if we have server in India and HTTP requests are coming from the India. In that case the traffic will be redirected to that particular geo location Instead of redirecting the traffic to other location. This routing policy will work if we have server in multiple location and you want to serve the local content.  
  • Multivalue Answer Routing: Multiple IP will be assigned to handle the request.
  • Latency Based Routing : Latency based routing will serve the request wherever it can get the faster response. Again it is similar to Geolocation routing but latency based routing is not location specific. if your request is getting response faster from USA then routing will serve your request from there. 
  • Weighted Routing : Here we defined the traffic weight-age. Means you will decide that how much % traffic will go to which server. 
  • Geo Proximity:

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