AWS Auto Scaling

What is Auto Scaling

  • AWS Auto Scaling enables you to configure automatic scaling for the scalable resources
  • You can configure automatic scaling for individual resources or for whole applications.
  • With AWS Auto Scaling, you configure and manage scaling for your resources through a scaling plan.
  • The scaling plan uses dynamic scaling and predictive scaling to automatically scale your application’s resources.
  • The scaling plan lets you choose scaling strategies to define how to optimize your resource utilization.
  • You can optimize for availability, for cost, or a balance of both.

Features of AWS Auto Scaling

  • Amazon EC2 Auto Scaling groups
    • Launch or terminate EC2 instances in an Auto Scaling group.
  • Amazon EC2 Spot Fleet requests:
    • Launch or terminate instances from a Spot Fleet request, or automatically replace instances that get interrupted for price or capacity reasons.
  • Amazon ECS
    • Adjust the ECS service desired count up or down in response to load variations.
  • Amazon DynamoDB
    • Enable a DynamoDB table or a global secondary index to increase or decrease its provisioned read and write capacity to handle increases in traffic without throttling.
  • Amazon Aurora
    • Dynamically adjust the number of Aurora read replicas provisioned for an Aurora DB cluster to handle changes in active connections or workload.

EC2 Auto Scaling

  • Auto Scaling allows your AWS compute needs (EC2 instances) to grow or shrink depending on your workload requirements
  • Auto scaling ensures that you have the right number of AWS EC2 instances for your needs at all times
  • Auto Scaling helps you save cost by cutting down the number of EC2 instances when not needed, and scaling out to add more instances only when it is required

Getting started with EC2 Auto Scaling

  • How many Availability Zones the Auto Scaling group should span.
  • What existing resources can be used, such as security groups or Amazon Machine Images (AMIs).
  • Whether you want to scale to increase or decrease capacity?
  • What metrics have the most relevance to your application’s performance.
  • How long it takes to launch and configure a server.
  • The goal of an Auto Scaling Group (ASG) is to:
    • Scale out (add EC2 instances) to match an increased load
    • Scale in (remove EC2 instances) to match a decreased load
    • Ensure we have a minimum and a maximum number of machines running
    • Automatically Register new instances to a load balancer

Auto Scaling Components

  • Launch Configuration:
    • Is the configuration template used to create new EC2 instances for the ASG, defines parameters like:
    • Instance family, instance type, AMI, Key pair, Block devices, and Sec groups are parameters defined in the launch configuration
    • Min Size / Max Size / Initial Capacity
    • Network + Subnets Information
    • Load Balancer Information
    • Scaling Policies
  • Auto Scaling Group:
    • Is a logical grouping of EC2 instances
  • Scaling Policy
    • Determines when and how the ASG scales or shrinks
      • On-demand/Dynamic scaling
      • Cyclic/Scheduled scaling

Scaling Options

  • Several ways to scale the Auto Scaling group
  • Manual scaling
    • Attach/detach ec2 instances manually
  • Dynamic scaling
    • Scaling policy added for dynamic scaling
  • Predictive scaling
    • Scaling actions are performed automatically as per the time and date set
  • Scheduled scaling
    • Can scale EC2 instances in your Auto Scaling group in advance of daily and weekly patterns

Predictive Scaling

  • Can scale EC2 instances in your ASG in advance of daily and weekly patterns
  • Predictive scaling policies use historical data to scale out your group ahead of forecasted hourly load.
  • Predictive scaling suited for
    • Cyclical traffic, such as high use of resources during regular business hours and low use of resources during evenings and weekends
  • Predictive scaling uses machine learning to predict capacity requirements based on historical data from CloudWatch.
AWS Auto Scaling

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top