High Availability and Scaling (EC2, Databases) Flashcards
What are Launch Templates?
- Define an EC2 Instance
- Used for autoscaling and more
- Support versioning
- Allow for more details on EC2 like networking information
- Recommended
What are Launch Configurations?
- Define an EC2 Instance
- Immutable
- Only used for autoscaling
- Not Recommended
How are Launch Templates different from Launch Configurations?
- Use Launch Templates over LaunchConfigurations (T>C)
- Launch Configurations are immutable
- Launch Templates have versions
- Launch Configurations can never contain networking information. Launch Templates can, but should not if they are to be used in an autoscaling group.
What must you do in a Launch Template to ensure you can use it in when defining an autoscaling group?
Don’t assign network information
What 4 bits of information and 3 optional bits of information can you include in a Launch Template?
- Required
- AMI
- Instance Class
- Storage
- Security Group (s)
- Optional
- User Data (Bootstrap Script)
- Key Pair
- Networking Information unless you’re using the Template for autoscaling.
What 6 items are an AutoScaling Group made up of?
- Launch Template
- Networking Space
- VPC & Availability Zones
- Elastic Load Balancer
- Group Size (Min, Max, Desired)
- Scaling Policies
- Target Tracking if you aren’t using Autoscaling Plans
- Notifications
- Typically SNS
Why is it important to use an ELB in front of an autoscaling group?
- The autoscaling group can use the health check in the ELB.
- This allows the autoscaling group to deregister and terminate unhealthy instances and spin up replacement EC2 instances.
- You must set these
What else can Autoscaling groups use in addition to Launch Templates and Launch Configurations to define target group?
- Autoscaling Groups can use Spot instances to save money
How do you achieve High Availability in an autoscaling group?
- Assign the Autoscaling group to multiple Availability Zones
- Always spread resources out over multiple availability zones
What are the warm-up and cool-down periods for autoscaling?
- Warm Up - Allows an amount of time fo rnew instances to come online before additional instances are created to avoid over-creation
- Cool Down - Default 5 Minutes - pauses scaling to avoid runaway scaling events
What are the 3 types of AutoScaling Policies?
- Dynamic
- Scheduled
- Predictive
What are 4 common metrics used within scaling policies for dynamic scaling in an AutoScaling Group?
- Average CPU Utilization
- Network In
- Network Out
- Application Load Balancer Request Count
What are some ways to scale relational databases
- Changing the class of a database (vertical scaling)
- Replacing RDS with DynamoDB
- Adding space to the database
- Create read replicas
- Cross-Region
- Cross Availability Zone
Can you scale database size down?
No. you can only increase the size.
What is DAX? what does it do?
- Dynamo DB Accelerator
- Decreases response time from milliseconds to microseconds