High Availability and Scaling (EC2, Databases) Flashcards

1
Q

What are Launch Templates?

A
  • Define an EC2 Instance
  • Used for autoscaling and more
  • Support versioning
  • Allow for more details on EC2 like networking information
  • Recommended
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are Launch Configurations?

A
  • Define an EC2 Instance
  • Immutable
  • Only used for autoscaling
  • Not Recommended
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How are Launch Templates different from Launch Configurations?

A
  • 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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What must you do in a Launch Template to ensure you can use it in when defining an autoscaling group?

A

Don’t assign network information

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What 4 bits of information and 3 optional bits of information can you include in a Launch Template?

A
  1. Required
    1. AMI
    2. Instance Class
    3. Storage
    4. Security Group (s)
  2. Optional
    1. User Data (Bootstrap Script)
    2. Key Pair
    3. Networking Information unless you’re using the Template for autoscaling.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What 6 items are an AutoScaling Group made up of?

A
  1. Launch Template
  2. Networking Space
    • VPC & Availability Zones
  3. Elastic Load Balancer
  4. Group Size (Min, Max, Desired)
  5. Scaling Policies
    • Target Tracking if you aren’t using Autoscaling Plans
  6. Notifications
    • Typically SNS
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Why is it important to use an ELB in front of an autoscaling group?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What else can Autoscaling groups use in addition to Launch Templates and Launch Configurations to define target group?

A
  • Autoscaling Groups can use Spot instances to save money
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do you achieve High Availability in an autoscaling group?

A
  • Assign the Autoscaling group to multiple Availability Zones
  • Always spread resources out over multiple availability zones
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the warm-up and cool-down periods for autoscaling?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the 3 types of AutoScaling Policies?

A
  • Dynamic
  • Scheduled
  • Predictive
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are 4 common metrics used within scaling policies for dynamic scaling in an AutoScaling Group?

A
  1. Average CPU Utilization
  2. Network In
  3. Network Out
  4. Application Load Balancer Request Count
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are some ways to scale relational databases

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Can you scale database size down?

A

No. you can only increase the size.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is DAX? what does it do?

A
  • Dynamo DB Accelerator
  • Decreases response time from milliseconds to microseconds
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is an easy way to scale a DynamoDB database with spikey workloads

A
  • change the provisioning to “on-demand”.
17
Q

Is an RDS read replica synchronous or asynchronous?

A

Asynchronous

18
Q

What three reasons might you create a cross-region read replica of an RDS database? Which database can you NOT do this with?

A
  1. Improve disaster recovery capabilities
  2. Replicate read data closer to users
  3. Simplify migration from one AWS region to another]
  • Not available with MS SQL Server
19
Q

Compare and contrast

  1. RDS Read Replicas
  2. RDS Multi-AZ Deployments
A
  1. RDS Read Replicas - Scalability
    1. Increased performance for read-heavy jobs
    2. Backups are asynchronous
    3. Can promote a read replica to primary DB
    4. Cna be used for disaster recovery if in a separate AZ or region
  2. RDS Multi-AZ - High Availability
    1. Used for disaster recovery, doesn’t affect performance
    2. Backups are synchronous
    3. Failover to backup happens automatically
    4. AWS does automatic failover
20
Q

What autoscaling scheme can keep you as close to a target capacity as possible?

A

Target Tracking Scaling - Doesnt wait for cooldown.. it just changes based on the load pattern

https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-target-tracking.html

21
Q

Which type(s) of autoscaling policies support cooling periods?

A

Simple Scaling. Note that using these isn’t recommended.

22
Q

Which two of the three types of Dynamic Autoscaling policies do NOT use cooldown?

Which one does use cooldown periods?

A
  • Dont use Cooldowns
    • Target Tracking - Think “thermostat”
    • Step scaling
  • Uses cooldowns
    • Simple scaling
23
Q

What type of scaling increases or decreases based on a set of scaling adjustments? Which one scales based on a single scaling adjustment?

A

Set → Step scaling.

Single → Simple scaling

24
Q

What services can be scaled using Autoscaling Plans?

A
  • EC2
  • ECS
  • DynamoDB
  • Aurora
25
Q

What methods are used by Autoscaling Plans to scale resources?

A
  • Tagging of resources
  • CloudFormation
  • Autoscaling Groups (EC2 Only)
26
Q

What’s the difference between AutoScaling Groups and AutoScaling Plans?

A

An AutoScaling group refers to the scaling of EC2 instances only. AutoScaling Plans can be used to scale EC2 Instances using AutoScaling Groups, but can also be used to scale other services (like ECS, Aurora, DynamoDB)

27
Q

What’s the relationship between Autoscaling Plans and Autoscaling Groups?

A

You set up an Autoscaling Plan to use a previously set up EC2 Autoscaling Group to scale up EC2 resources optimizing for cost or performance

28
Q

What types of scaling can you enable when setting up Autoscaling Plans to scale EC2’s using an autoscaling Group?

A
  • Predictive Scaling
  • Scheduled Scaling

Note. You cannot set up dynamic scaling this way.

29
Q

What are the 3 variations on Dynamic Scaling in an AutoScaling Group?

A
  1. Target Tracking Scaling - you specify a CloudWatch metric and target value
  2. Step Scaling - You choose scaling metrics and threshold values for the CloudWatch alarms that invoke the scaling process
  3. Simple Scaling - You choose scaling metrics and threshold values for the CloudWatch alarms that invoke the scaling process, but is subject to cooldown period before responding to additional alarms