High Availability/Scaling Flashcards

1
Q

Vertical Scaling

A
  • works only up to a certain point
  • resize processor size (ex: t3.micro to x1.xL)
  • appropriate only in certain circumstances
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Horizontal Scaling

A
  • spin up limitless EC2 instances

- increases high availability

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

3 W’s of Scaling

A

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.

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

Launch template

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

Launch configuration

A
  • only for autoscaling
  • immutable (can’t change it)
  • limited config options
  • don’t use them
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

When given a choice between Launch Templates and Launch Configurations which do you choose?

A

Launch Templates

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

What goes into a Launch template?

A
  • AMI
  • EC2 instance size
  • security groups
  • potentially networking info
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Why don’t you want to put a VPC inside a launch template?

A

it would prohibit you doing a autoscaling group later

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

Can you change the bootstrap script in a Launch template

A

only if you create a new version of it

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

Auto-scaling Groups

A
  • a collection of EC2 instances that are treated as a collective group in terms of management
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Steps for creating an auto scaling group

A

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

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

When do you indicate that you want to use the load balancer health checks for auto scaling group?

A

Must choose the setting during configuration

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

Autoscaling limits

A

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.

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

Spot Instances in an auto scaling group

A
  • to save money

- can combine OnDemand and spot instances

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

How to get high availability?

A
  • Multiple AZs
  • use a load balancer
  • use an autoscaling group
  • set autoscaling group to use health checks
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How auto-scaling group can handle networking

A

select multiple subnets to spread across AZs

17
Q

How can an auto scaling group notify you?

A

via SNS

18
Q

Step Scaling

A

when there’s a check in based on a target value (ex: memory) and if it has 0 - 40% of the target it scales in, and if it has 60% - 100% of target, it scales out)

19
Q

Instance Count scaling

A

when there’s a check in and it sees how many instances are currently healthy compared to the target number of instances.

20
Q

Scaling Policies - Scaling out example

A
  • Add 10 instances when memory is between 60 - 80%

- Add 15 instances when memory usage is b/w 80 - 100%

21
Q

Scaling Policies - Scaling in example

A
  • terminate 10 instances when memory usage is between 20 - 40%
  • terminate 15 instances when memory usage is between 0 - 20%
22
Q

Warm up period

A

auto scaling hangs out and does not check the new instances

- auto scaling will continue to check necessary capacity, but takes into account that the new instances are warming up

23
Q

Scaling tips

A
  • Scaling out takes longer than scaling in.

- Scale out aggressively Scale in conservatively.

24
Q

Cool Down

A
  • default: 5 minutes
  • pauses autoscaling for a set amount of time
  • helps prevent runaway scaling events
25
Q

Thrashing

A

when you’re spinning up new instances and terminating them in an uncontrolled manner

26
Q

Steady State autoscaling group

A
  • can change its AZ and put itself back online if it gets terminated
  • when min = max = desired = 1, but you still need to be highly available
  • ex: legacy app that cannot be copied
27
Q

Auto Scaling exam tips

A
  • choose reasonably sized min and max without over engineering
  • bake things into AMIs so warmup takes less time
  • use Reserved Instances to cover the minimum
  • use spot instances to fill in
28
Q

Scaling non-relational databases (Dynamo DB)

A

AWS does all of the Dynamo DB scaling for you

29
Q

Provisioned model

A

use case: generally predictable workload

  • effot to use: need to review past usage to set upper and lower scaling bounds
  • cost: most cost-effective model
  • most predictive scaling model
30
Q

On Demand model

A
  • use case: sporadic workload
  • effort to use: select ‘on Demand’
  • cost: small cost per read and write; less cost effective
31
Q

Dynamo exam tips

A
  • favor cost savings over scaling
  • predictable workload -> choose provisioned
  • sporadic workload -> choose On Demand
  • Avoid keys with similar values to get better performance
  • can switch between provisioned and on demand every 24 hours
  • most questions will be about cost