HA and Scaling Flashcards
What are the 3 Ws for scaling?
What, Where, When
What resources, Where in the OSI model, When to scale
What is a launch template?
A launch template specifies all the configs needed to build an ec2 instance
*What goes into a launch template?
AMI, instance size, SG, possibly network information (VPC), User data
What happens if you include networking (e.g. VPC) information in a launch template?
The template can’t be used with Auto Scaling Groups as the ASG has to specify the VPC
Between Launch Templates and Launch Configurations what should you use?
Use Launch Templates as they are newer
How do you change user data when there is a launch template?
You will need to create a new version of the launch template, and include the adjusted user data in it.
What is the difference between launch templates and configurations for mutability, networking, autoscaling, configs?
- Versioned vs. immutable
- Optional to include vs. can’t include
- For more than Autoscaling vs. only for autoscaling
- more config granularity options vs. less options
What is an AutoScaling Group?
Collection of instances treated as a single unit and defines where to create/destroy instances
What feature should you use if you want an ELB with AutoScaling Group?
You need to set the ASG to use the health checks of the LB so that the ASG will deregister and spin up instances at the LB level
What networking does an ASG define? What should you do for HA?
ASG needs to define the VPC and AZ, of which a minimum of 2 different AZ’s should be used
What is the minimum # autoscaling you should usually go?
2 is the lowest you usually should go
Can you mix instance types? Which ones? Why?
Yes, On-demand and spot instances, RI, use spot instances to save money
What 3 attributes doe group size policy contain?
Min, Max, Desired
What do you want to do for scaling in and scaling out? What are you preventing?
Scale in conservatively (fast to terminate, slowly roll back), scale out aggressively (warm up period, handle workload). Prevent Thrashing
What is warm-up period? Why?
Instances are not placed behind a LB, and not included in the health check to prevent being terminated while being spun up.