High Availability/Scaling Flashcards
Vertical Scaling
- works only up to a certain point
- resize processor size (ex: t3.micro to x1.xL)
- appropriate only in certain circumstances
Horizontal Scaling
- spin up limitless EC2 instances
- increases high availability
3 W’s of Scaling
What - what do we scale, where is the template coming from?
Where - where in the VPC does it make sense to scale? Which load balancer
When - When do I scale? Cloud Watch Alarms can tell us when to scale.
Launch template
- a collection of settings that go into building an EC2 instance
- so you don’t have to use the wizard every time
- save the wizard results to a template
- supports versioning
- more granularity
- recommended by AWS
Launch configuration
- only for autoscaling
- immutable (can’t change it)
- limited config options
- don’t use them
When given a choice between Launch Templates and Launch Configurations which do you choose?
Launch Templates
What goes into a Launch template?
- AMI
- EC2 instance size
- security groups
- potentially networking info
Why don’t you want to put a VPC inside a launch template?
it would prohibit you doing a autoscaling group later
Can you change the bootstrap script in a Launch template
only if you create a new version of it
Auto-scaling Groups
- a collection of EC2 instances that are treated as a collective group in terms of management
Steps for creating an auto scaling group
1) pick your launch template
2) pick your VPC and network and purchasing options
3) configure your Elastic Load Balancer
4) set scaling policies (min, max, capacity)
5) set up notifications via SNS
When do you indicate that you want to use the load balancer health checks for auto scaling group?
Must choose the setting during configuration
Autoscaling limits
Minimum - the lowest # of EC2 instances you’ll ever have on line
Maximum - the highest # of EC2 instances
Desired Capacity - how many instances do you want right now - constantly changing.
Spot Instances in an auto scaling group
- to save money
- can combine OnDemand and spot instances
How to get high availability?
- Multiple AZs
- use a load balancer
- use an autoscaling group
- set autoscaling group to use health checks