Scaling - Auto Scaling Flashcards
What are the types of auto scaling?
EC2 Auto Scaling, Application auto scaling and AWS Auto Scaling
What is Amazon EC2 Auto scaling?
setup scaling groups for EC2; perform health checks to remove unhealthy instances
What is Application Auto Scaling?
API used to control scaling for resources other than EC2 like Dynamo, ECS, and EMR; common way to scale other resources
What is AWS Auto Scaling?
safely scaling multiple AWS resources; predictive scaling console that can manage a collection EC2, ELB and DDB
What is an EC2 Auto Scaling group?
automatically horizontally scales out triggered by an event which adds or removes instances that factors availability, cost and system metrics; add or terminate instances to help ensure correct number of instances to handle your application load
What are the 4 EC2 Auto Scaling options?
Maintain - keep specific EC2s running, Manual - max, specific or min EC2s running, Schedule - add or remove based on schedule, Dynamic - based on collected metrics
What is a launch configuration?
a template Auto Scaling Group uses to launch instances; specifies VPC and subnets, attached to a ELB, defines a health check grace period, AMI are specified; only one launch configuration for a scaling group at a time; can’t change once created
What is an EC2 Auto Scaling Policy?
Dynamic auto scaling option can scale based on the target tracking, simple, and step scaling policies
What is Target Tracking Policy?
scale based on predefined metric value such as when CPU reaches 70%, scale up
What is Simple Scaling Policy?
Waits until health checks and cool down period expires before add new instances
What is Step Scaling Policy?
scaling with more logic and sophistication; require Cloudwatch and high/low thresholds for alarms; better than simple scaling if you have only a single scaling adjustment
What is the cool down period?
duration given before scaling up or down; default 300 seconds, used in dynamic scaling, manual scaling, but not schedule scaling; prevent addition of too many instances
What are the steps for creating an Autoscaling group?
Create an ALB in EC2 Create a SG for the ALB Create a Launch Template in EC2 Create a new EC2 Key Pair for launch instances Create a SG between EC2 and ALB Name launch template, choose AMI and instance type Create Auto Scaling Group Add Launch Template to ASG Modify Group size and Scaling policies Test horizontal scaling
What is a launch template?
similar to launch configuration, but allows for multiple versions of a template; templates are recommended over launch configurations for newer features; allows for template updates and provision both on-demand and spot instances