Mahesh TR
Auto Scaling Group (ASG)
Mahesh TR
What is AutoScaling
➢ Auto Scaling helps you ensure that you have the correct number of Amazon EC2 instances available to
handle the load for your application.
You create collections of EC2 instances, called Auto Scaling groups.
➢ You can specify the minimum number of instances in each Auto Scaling group, and Auto Scaling ensures that
your group never goes below this size.
➢ You can specify the maximum number of instances in each Auto Scaling group, and Auto Scaling ensures that
your group never goes above this size.
➢ If you specify the desired capacity, either when you create the group or at any time thereafter, Auto Scaling
ensures that your group has this many instances.
➢ If you specify scaling policies, then Auto Scaling can launch or terminate instances as demand on your
application increases or decreases
Mahesh TR
Configuring Auto Scaling in AWS
Launch
Configuration
Parameters for launching instances
Auto Scaling
Groups
Post-launch parameters
Auto Scaling
Policy
Scaling triggers
Scaling Event Act of scaling itself
Mahesh TR
• Configuring Auto Scaling in AWS
Launch
Configuration
Set of parameters used to launch EC2 instances – AMI,
instance size, security groups
Auto Scaling
Groups
Defines the post-launch parameters
Auto Scaling
Policy
Rules for scaling or terminating autoscaled instances
Scaling Event Act of scaling itself
• AMI ID
• Instance size
• Block devices
• Key pairs
• Security groups
Mahesh TR
• Configuring Auto Scaling in AWS
Launch
Configuration
Set of parameters used to launch EC2 instances – AMI,
instance size, security groups
Auto Scaling
Groups
Defines the post-launch parameters - AZ, ELB, min & max
servers to run
Auto Scaling
Policy
Rules for scaling or terminating autoscaled instances
Scaling Event Act of scaling itself
• Minimum & maximum number
of EC instances to run
• Cooldown parameters
• AZ & VPC ids where these
instances will run
Mahesh TR• Configuring Auto Scaling in AWS
Launch
Configuration
Set of parameters used to launch EC2 instances – AMI,
instance size, security groups
Auto Scaling
Groups
Defines the post-launch parameters
Auto Scaling
Policy
Rules for scaling or terminating autoscaled instances
Scaling Event Act of scaling itself
• Initiate scaling activity
• Use CloudWatch metrics as triggers
– EC2: CPU, disk, memory, network
– ELB: healthy instances, HTTP code, latency, request
count
Mahesh TR
• Configuring Auto Scaling in AWS
Launch
Configuration
Set of parameters used to launch EC2 instances – AMI,
instance size, security groups
Auto Scaling
Groups
Defines the post-launch parameters
Auto Scaling
Policy
Rules for scaling or terminating autoscaled instances
Scaling Event Act of scaling itself
• Act of scaling up/down
• Notification of scaling activity
Mahesh TR
Mahesh TR
Mahesh TR
AutoScaling
• Auto Scaling dynamically adds and removes EC2 instances,
while Elastic Load Balancing manages incoming requests by
optimally routing traffic so that no one instance is
overwhelmed
• Auto Scaling helps to automatically increase the number of
EC2 instances when the user demand goes up, and decrease
the number of EC2 instances when demand goes down
Mahesh TR
AutoScaling
• Autoscaling configuration requires the following :-
• Launch configuration which allows you to select an
• AMI
• Instance type
• IAM role (optional)
• Security group
• Key pair file
Mahesh TR
AutoScaling
• High Availability & Redundancy
• Auto Scaling can span across multiple AZs, within the same
region
• When one AZ becomes unhealthy or unavailable, Auto
Scaling launches new instances in an unaffected AZ
• When the unhealthy AZs recovers, Auto Scaling redistributes
the traffic across all the healthy AZs
• It is recommended to take advantage of the safety and
reliability of geographic redundancy by using Auto Scaling &
ELB by spanning Auto Scaling groups across multiple AZs
within a region and then setting up ELB to distribute
incoming traffic across those AZs.
Mahesh TR
THANK YOU!

AWS AutoScaling

  • 1.
  • 2.
    Mahesh TR What isAutoScaling ➢ Auto Scaling helps you ensure that you have the correct number of Amazon EC2 instances available to handle the load for your application. You create collections of EC2 instances, called Auto Scaling groups. ➢ You can specify the minimum number of instances in each Auto Scaling group, and Auto Scaling ensures that your group never goes below this size. ➢ You can specify the maximum number of instances in each Auto Scaling group, and Auto Scaling ensures that your group never goes above this size. ➢ If you specify the desired capacity, either when you create the group or at any time thereafter, Auto Scaling ensures that your group has this many instances. ➢ If you specify scaling policies, then Auto Scaling can launch or terminate instances as demand on your application increases or decreases
  • 3.
    Mahesh TR Configuring AutoScaling in AWS Launch Configuration Parameters for launching instances Auto Scaling Groups Post-launch parameters Auto Scaling Policy Scaling triggers Scaling Event Act of scaling itself
  • 4.
    Mahesh TR • ConfiguringAuto Scaling in AWS Launch Configuration Set of parameters used to launch EC2 instances – AMI, instance size, security groups Auto Scaling Groups Defines the post-launch parameters Auto Scaling Policy Rules for scaling or terminating autoscaled instances Scaling Event Act of scaling itself • AMI ID • Instance size • Block devices • Key pairs • Security groups
  • 5.
    Mahesh TR • ConfiguringAuto Scaling in AWS Launch Configuration Set of parameters used to launch EC2 instances – AMI, instance size, security groups Auto Scaling Groups Defines the post-launch parameters - AZ, ELB, min & max servers to run Auto Scaling Policy Rules for scaling or terminating autoscaled instances Scaling Event Act of scaling itself • Minimum & maximum number of EC instances to run • Cooldown parameters • AZ & VPC ids where these instances will run
  • 6.
    Mahesh TR• ConfiguringAuto Scaling in AWS Launch Configuration Set of parameters used to launch EC2 instances – AMI, instance size, security groups Auto Scaling Groups Defines the post-launch parameters Auto Scaling Policy Rules for scaling or terminating autoscaled instances Scaling Event Act of scaling itself • Initiate scaling activity • Use CloudWatch metrics as triggers – EC2: CPU, disk, memory, network – ELB: healthy instances, HTTP code, latency, request count
  • 7.
    Mahesh TR • ConfiguringAuto Scaling in AWS Launch Configuration Set of parameters used to launch EC2 instances – AMI, instance size, security groups Auto Scaling Groups Defines the post-launch parameters Auto Scaling Policy Rules for scaling or terminating autoscaled instances Scaling Event Act of scaling itself • Act of scaling up/down • Notification of scaling activity
  • 8.
  • 9.
  • 10.
    Mahesh TR AutoScaling • AutoScaling dynamically adds and removes EC2 instances, while Elastic Load Balancing manages incoming requests by optimally routing traffic so that no one instance is overwhelmed • Auto Scaling helps to automatically increase the number of EC2 instances when the user demand goes up, and decrease the number of EC2 instances when demand goes down
  • 11.
    Mahesh TR AutoScaling • Autoscalingconfiguration requires the following :- • Launch configuration which allows you to select an • AMI • Instance type • IAM role (optional) • Security group • Key pair file
  • 12.
    Mahesh TR AutoScaling • HighAvailability & Redundancy • Auto Scaling can span across multiple AZs, within the same region • When one AZ becomes unhealthy or unavailable, Auto Scaling launches new instances in an unaffected AZ • When the unhealthy AZs recovers, Auto Scaling redistributes the traffic across all the healthy AZs • It is recommended to take advantage of the safety and reliability of geographic redundancy by using Auto Scaling & ELB by spanning Auto Scaling groups across multiple AZs within a region and then setting up ELB to distribute incoming traffic across those AZs.
  • 13.