ASG - Auto Scaling Group Flashcards

1
Q

What does an ASG define regarding capacity?

A

defines a min, max and initial capacity of machines running

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

How are ASGs related to ELBs?

A

an ASGs automatically scales out or in instances to a load balancer

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

What can you use to create an ASG?

A

A launch template (newer and recommended) or a launch configuration or an EC2 instance

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

Based on what an ASG scale?

A

It can scale based on

  • scaling policies
  • CloudWatch alarms created from custom metrics sent
  • based on a schedule
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What you need to do to update an ASG?

A

u need to provide a new launch template / configuration

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

What happens to IAM roles attached to an ASG?

A

will get assigned to EC2 instances

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

What actions can be taken by an ASG if an ELB marks an instance as unhealthy

A

the ASG can terminate the unhealthy instance and hence replace it

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

Which are the ASG scaling policies?

A
  • Target Tracking Scaling
  • Simple / Step Scaling
  • Scheduled Actions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Mention the Target Tracking Scaling policy concept

A

you want to keep something stable like:

avg ASG CPU to stay around 40%

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

Mention the ASG Simple / Step Scaling policy concept

A

you set max or min metric values to achieve like:
• When a CloudWatch alarm is triggered (example CPU > 70%), then add 2 units
• When a CloudWatch alarm is triggered (example CPU < 30%), then remove 1

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

What is the ASG Scaling Cooldown?

A

The cooldown period helps to ensure that your Auto Scaling group doesn’t launch or terminate additional instances before the previous scaling activity takes effect.

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

Can you define an ASG scaling cooldown?

A

yes, in addition to default cooldown, you can create cooldowns that apply to specific simple scaling policies

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

What is the default ASG default cooldown period?

A

5 minutes

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

What is the ASG Default Termination Policy?

A
  1. Find the AZ which has the most number of instances
  2. Delete the one with the oldest launch configuration
  3. Delete the one closest to the end of the billing period
    • ASG tries the balance the number of instances across AZ by default
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What does ASG Lifecycle Hooks allow you to do?

A

to perform extra steps before the instance goes in service (Pending state) and before the instance is terminated (Terminating state)

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

What is included in the ASG launch template / configuration?

A
Basically everything included in an EC2 instance:
- AMI
- instance type
- key-pair
- SGs
...etc
17
Q

What is the main difference between ASG launch configuration and ASG launch templates

A

configuration is legacy and must be re-created every time.

template can have multiplle versions and is recommended by AWS going forward.

18
Q

How are metrics computed in ASGs?

A

for the overall ASG instances

19
Q

Who can terminate and replace instances marked as unhealthy? The ASG or the ALB?

A

ASG

20
Q

What is the difference between Step and Simple scaling?

A
  • Step scaling: based on a set of scaling adjustments, known as step adjustments, that vary based on the size of the alarm breach.
  • Simple scaling: based on a single scaling adjustment.