HA and Scaling Flashcards

1
Q

What are the 3 Ws for scaling?

A

What, Where, When

What resources, Where in the OSI model, When to scale

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

What is a launch template?

A

A launch template specifies all the configs needed to build an ec2 instance

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

*What goes into a launch template?

A

AMI, instance size, SG, possibly network information (VPC), User data

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

What happens if you include networking (e.g. VPC) information in a launch template?

A

The template can’t be used with Auto Scaling Groups as the ASG has to specify the VPC

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

Between Launch Templates and Launch Configurations what should you use?

A

Use Launch Templates as they are newer

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

How do you change user data when there is a launch template?

A

You will need to create a new version of the launch template, and include the adjusted user data in it.

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

What is the difference between launch templates and configurations for mutability, networking, autoscaling, configs?

A
  1. Versioned vs. immutable
  2. Optional to include vs. can’t include
  3. For more than Autoscaling vs. only for autoscaling
  4. more config granularity options vs. less options
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is an AutoScaling Group?

A

Collection of instances treated as a single unit and defines where to create/destroy instances

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

What feature should you use if you want an ELB with AutoScaling Group?

A

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

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

What networking does an ASG define? What should you do for HA?

A

ASG needs to define the VPC and AZ, of which a minimum of 2 different AZ’s should be used

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

What is the minimum # autoscaling you should usually go?

A

2 is the lowest you usually should go

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

Can you mix instance types? Which ones? Why?

A

Yes, On-demand and spot instances, RI, use spot instances to save money

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

What 3 attributes doe group size policy contain?

A

Min, Max, Desired

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

What do you want to do for scaling in and scaling out? What are you preventing?

A

Scale in conservatively (fast to terminate, slowly roll back), scale out aggressively (warm up period, handle workload). Prevent Thrashing

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

What is warm-up period? Why?

A

Instances are not placed behind a LB, and not included in the health check to prevent being terminated while being spun up.

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

What is cool-down period? Why? Default?

A

Applies to both creation/termination, ignores multiple scaling events within a time period. Prevents runaway scaling. Default time period is 5 minutes

17
Q

What are the 3 types of scaling?

A
  1. Reactive
  2. Scheduled
  3. Predictive
18
Q

What is Reactive Scaling?

A

Measure the data points and catchup to create/terminate resources

19
Q

What is Scheduled Scaling?

A

When you have a predictable workload, you can schedule resources to come up before needed

20
Q

What is Predictive Scaling?

A

AWS service using ML to predict when to scale

21
Q

What do you need to do if you need an instance that there can only be one copy but it needs to be HA?

A

You should configure a steady state auto scaling group with min, max, desired set to 1

22
Q

How do you save money mixing instance types?

A

Use RI to cover min counts, and Spot instances to scale

23
Q

How do you save money mixing instance types?

A

Use RI to cover min counts, and Spot instances to scale

24
Q

What are the 4 ways to scale RDS?

A
  1. Vertical scaling
  2. Scale Storage space
  3. Use Read Replicas
  4. Use Aurora Serverless
25
Q

What do you need to watch out for when scaling RDS Storage?

A

Storage can be scaled up but not down.

26
Q

What increments does Aurora scale storage?

A

10 GB increments automatically

27
Q

For RDS Read Replicas is the endpoint the same or different than the writer? What about cross region?

A

Read endpoints are separate from the writer. You can have a cross region read replica.

28
Q

What option should you pick if it is viable to switch db engines?

A

You should pick DynamoDB and refactor over scaling RDS

29
Q

What are the 2 scaling options for DyanmoDB?

A
  1. Provisioned

2. On-Demand

30
Q

What is Provisioned Scaling for DynamoDB?

A

For Predictable workloads, more cost effective, you set the read/write capacity and target utilization

31
Q

What is On-Demand for DynamoDB?

A

For sporadic workloads, less cost effective, pay per read/write

32
Q

What limit is there on switching between provisioned and on-demand DynamoDB models?

A

A 24 hour switch limit

33
Q

What should be avoided for DynamoDB performance?

A

Hot Keys

34
Q

What services do AutoScaling Groups work for?

A

Only EC2

35
Q

How do you speed up provisioning instances in AutoScaling Groups?

A

You should bake the AMI’s over using User Data