Auto Scaling

Auto Scaling

Auto Scaling

In this article reader can understand what auto scaling group is, different policies for the working of auto scaling group.

Auto Scaling:

Scaling means adding and removing the resources. This can be done automatically; hence this feature is called auto scaling. Auto scaling can also be called as elasticity. Auto scaling adds the resources when the demand goes up and removes the resources when the demand goes down.

           Definition: Auto scaling is a feature of cloud computing that automatically adds and removes compute resources depending on actual uses and demand.

AWS also the feature of Auto Scaling. It is a service in AWS that monitors the application and automatically adjusts the capacity to maintain steady, predictable application performance at the lowest cost. For monitoring the demand AWS Auto scaling uses CloudWatch to scale up and scale down the resources. CloudWatch is a monitoring service and it monitors application metrics like CPU, memory, network and many more. Based on the threshold value CloudWatch service triggers the alarm. After the alarm triggers based on the requirement Auto scaling adds and removes the resource based on the demand.

Benefits of Auto Scaling:

·        Automate the process to scale up or down quickly.

·         Only pay for what we use.

·        Application performance is maintained during peak hours.

EC2 Auto Scaling Group

Definition: EC2 auto scaling group is a group of amazon EC2 instances used for performing the feature of auto scaling.

Features of EC2 Auto Scaling:

·        EC2 Auto scaling launches and terminates instances dynamically

·        Scaling is horizontal that is it scales out

·        It provides elasticity and scalabiliy

·        EC2 auto scaling responds to status checks and CloudWatch metrics.

No alt text provided for this image

Figure: Auto Scaling Group

There are 3 configurations with respect to Auto scaling Group, based on these auto scaling will adjust the number of instances within the minimum and maximum number of EC2 instances. The configurations are

·        Minimum Size: The minimum number of instances that should be running in an ASG. This is fixed. ASG does not terminate the instance below this number.

·        Desired Capacity: It determines how many EC2 instances we want to run ideally. Auto scaling will try to maintain the desired capacity always. Desired capacity is resizable between the minimum and maximum size. It should be greater than or equal to the minimum size but less than or equal to the maximum size.

·        Maximum Size: The no of EC2 instances allowed to run in the ASG. Auto scaling group will not create the instances greater than the maximum size.

EC2 Auto Scaling Policies:

Scaling starts with an event or scaling action. This action instructs the ASG either to launch or terminate the EC2 instance based on the policy. There are different types of auto scaling policies which are designed for various purposes.

·        Manual Scaling: This is the very basic way of scaling the resources. Based on the flow of traffic in the application we can manually change the size of an existing ASG. That is we can update the desired capacity of the ASG manually.

·        Dynamic Scaling: Scale the capacity of ASG in response to changing demand. That is we can increase the no of resources with the increase in demand and decrease the no of resources with the decrease in demand. There are 2 types of dynamic scaling policies. That is Simple / Step Scaling and Target Tracking Scaling.

Ø Simple / Step scaling allow us to choose the scaling based on metrics and thresholds. In this type we define the trigger point to take action and how many instance to add and remove.

Ø Target Tracking Scaling allows us to select a scaling metric and set a target value.

·        Schedule Scaling: Schedule Scaling helps to set up our scaling schedule according to predictable load changes. Schedule scaling is based on the time parameters.

·        Predictive Scaling: Predictive scaling help scale faster by launching capacity in advance of forecasted load. Predictive scaling acts based on real time metric and historical data. Predictive scaling uses machine learning technique to predict the scaling of resources.

Working of Auto Scaling

Working of Auto Scaling can be explained by the following steps.

Initially to create the Auto Scaling Group we have to create a Launch Template. Before Launch template Launch configuration was used. Both Launch configuration and Launch Template defines the characteristics of the EC2 instances. Launch template has extra features and capabilities compared to launch configuration. Using Launch template we can define the configurations of our EC2 instances.

No alt text provided for this image

Figure: Auto Scaling of EC2 instance

  1. Based on the template we can create the Auto Scaling Group with desired capacity number of instances.
  2. Auto scaling depends on various factors like event, metric and threshold.
  3. Based on the requirement the policy can be configured using CloudWatch alarm.
  4.  This policy can instruct the Auto scaling Group to add or remove EC2 instances.
  5. Auto scaling needs the instance launch configuration to launch EC2 instances. Based on the Launch template EC2 instance will be launched with demand.
  6.  Again CloudWatch will monitor the ASG based on the metric or threshold, it will trigger the alarm based on the condition and instructs the ASG to add or remove the instances.

Note : ASG makes sure that consideration of maximum size during the scale out and minimum size during the scale in.

Conclusion: From this article people can understand what is auto scaling and how auto scaling can be done with EC2 instances.

To view or add a comment, sign in

More articles by LAXMI JAYANNAVAR

  • AWS Billing & Pricing

    In this article we will be learning the different pricing principles in AWS, understand the AWS organization and its…

    2 Comments
  • AWS Monitoring

    AWS Trusted Advisor The AWS Trusted Advisor service examines all the resources in our AWS account and makes…

    2 Comments
  • AWS Security

    Shared Responsibility Model: Every layer and step of any IT resource, including its networks, facilities, and…

    4 Comments
  • Databases in AWS

    Data Individual facts, statistics, or pieces of information are known as data, and they are frequently numerical and…

    3 Comments
  • COMPUTE SERVICES in AWS

    Compute is the one of the main service offered by AWS. Compute is a type of Infrastructure as a Service(IaaS) because…

    1 Comment
  • VPC and Components

    VPC Overview: · Virtual Private Cloud, sometimes known as VPC, is a networking component of cloud computing. It is an…

    4 Comments
  • AWS Storage Gateway

    AWS Storage Gateway Before going to learn about AWS storage gateway let’s consider a scenario, Assume our application…

    2 Comments
  • Advanced services: Content delivery and Storage

    In this article people can have a look at the other AWS services like snow family and cloudfront. CloudFront Let’s…

    2 Comments
  • Elastic Load Balancer with Auto Scaling Group

    Introduction: This article explains about the concept of load balancer types and the working of load balancer with auto…

    2 Comments
  • Types of Storage Services in AWS

    Types of Storage Services in AWS Introduction: In this article I will be explaining about the different storage…

Insights from the community

Others also viewed

Explore topics