Elastic Load Balancing and Autoscaling Flashcards

1
Q

Auto Scaling

A

automatically launches and terminates instances within a Region
maintains availability and horizontally scales (scale out) capacity
provides elasticity and scalability
works with EC2, EKS, ECS

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

What services does Auto Scaling integrate with and how?

A

CloudWatch for monitoring and scaling
ELB for distributed connections
EC2 Spot Instances for cost optimization
VPC for deploying instances across AZs

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

Use cases for auto scaling

A

automatic scaling
maintain availability

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

What triggers autoscaling

A

scaling policies based on demand/performance e.g. (EC2 status checks, CloudWatch metrics) or schedule

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

What is a launch template?

A

specified EC2 instance configuration for autoscaling:

AMI
Instance type
EBS volumes
Security Group
key pair
IAM instance profile
User data
Shutdown behavior
termination protection
placement group name
capacity reservation
tenancy
purchasing option (e.g. spot)

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

Launch Config

A

specified EC2 instance configuration for autoscaling:

AMI
Instance type
EBS volumes
Security Group
key pair
IAM instance profile
User data
purchasing option (e.g. spot)

replaced by launch templates and have fewer features

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

What do you configure for auto scaling

A

Launch template or config
Purchase options (on demand or spot)
Configure VPC and Subnets
Attach load balancer
configure health checks for EC2 and ELB
Group size and scaling policies

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

What types of health checks are possible with autoscaling

A

EC2 - EC2 health checks
ELB - ELB health checks in addition to EC2 health checks

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

Health Check Grace Period

A

how long to wait before checking the health status of the instance

autoscaling does not act on health checks until the grace period expires

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

Types of Auto Scaling

A

Manual - makes changes to ASG size manually
Dynamic - automatically scale based on demand
Predictive - uses ML to predict
Scheduled - scales based on schedule

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

What do scaling policies do?

A

define how to respond to changes in demand

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

Autoscaling Group

A

defines collections of EC2 instances that are scaled and managed together

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

What types of monitoring are available for ASG?

A

Group
Basic (Instance)
Detailed (Instance)

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

How often does ASG produce metrics? Is there a charge? How are they configured?

A

1 minute granularity
No Charge
Must be enabled

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

How often does an EC2 instance produce metrics? Is there a charge?

A

5 minute granularity
No Charge

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

How often does an EC2 instance produce detailed metrics? Is there a charge?

A

1 minute granularity
Yes, charges apply

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

What are Cooldowns? What is the default?

A

Used with simple scaling policy to prevent Autoscaling from launching or terminating before effects of previous activities are visible. default is 300 seconds (5 mins)

18
Q

Termination Policy

A

Controls which instances to terminate first when a scale in event occurs

19
Q

Why do you use the Standby State?

A

Used to put an instance in the InService state into the Standby state to update or troubleshoot the instance

20
Q

Lifecycle Hooks

A

Used to perform custom actions by pausing instances as the ASG launches or terminates them

21
Q

Lifecycle Hooks use cases

A

Run a script to download and install software after launch
Pause an instance to process data before a scale in (termination)

22
Q

ELB

A

Elastic Load Balancer

distributes incoming application traffic across multiple targets

distributes incoming traffic within a single AZ or across multiple AZs

provides fault tolerance for applications

23
Q

What can be targeted by ELB

A

EC2
Containers
IP addresses
Lambda functions

24
Q

What is the smallest subnet and the minimum number of available IPs required in order for ELB to scale?

A

/27

8 IP addresses

25
Q

Are there any limitations on how to configure ELB with respect to AZ?

What ways can ELBs be exposed to network traffic?

A

only 1 subnet per AZ can be enabled for each ELB

Internal only or internet facing

26
Q

Characteristics of Internet Facing ELB

A

ELB nodes have public IPs
Routes traffic to the private IP addresses of the EC2 instances
Need one public subnet in each AZ where the ELB is defined

27
Q

Characteristics of Internal Only ELB

A

ELB nodes have private IPs
Routes traffic to the private IP of the EC2 instances

28
Q

What are the different types of ELBs?

A

Application Load Balancer (ALB)
Network Load Balancer (NLB)
Gateway Load Balancer (GLB)

29
Q

Use cases for ALB

A

Web applications with L7 routing (HTTP/HTTPS)
Microservices architecture (e.g. Docker containers)
Lambda targets

30
Q

Use cases for NLB

A

TCP and UDP (L4) based applications
Ultra-low latency
Static IP addresses
VPC endpoint services

31
Q

Use cases for GLB

A

Layer 3 applications (virtual appliances)
Listens for all IP packets across all ports
GLB and virtual appliances exchange application traffic using the GENEVE protocol on 6081

32
Q

What types of systems are GLBs used to load balance?

A

Virtual applicances such as:
Firewalls
Intrusion detection systems (IDS)
Intrusion protection systems (IPS)
Deep packet inspection systems (DPI)

33
Q

What happens when cross zone load balancing is enabled?

A

Each load balancer node distributes traffic across the registered targets in all enabled AZs

34
Q

What happens when cross zone load balancing is disabled?

A

Each load balancer node distributes traffic only across the registered targets in its AZ

35
Q

When is cross zone load balancing enabled, disabled?

A

With ALB it is always enabled

With NLB and GLB it is disabled by default

36
Q

What kind of autoscaling policies are there?

What policies does AWS recommend?

A

Simple
Step
Target Tracking
Scheduled

Target tracking is recommended over simple and step

37
Q

Target Tracking

A

scales the capacity of your ASG based on a target metric value

38
Q

Warm Up Time

A

IN a target tracking policy instance metrics are not counted until the warm up time has expired - time provided for the instance to warm up

39
Q

AWS recommendation for metrics used in target tracking policy

A

AWS recommends scaling on metrics with a one minute frequency

40
Q

Simple Scaling

A

Set an alarm (e.g. CPU>= 60%)
When cloud watch reports the alarm is reached to the ASG and the ASG will scale out and will wait another 300 seconds (5 mins) before allowing another scaling activity

41
Q

Step Scaling

A

similar to simple scaling but the amount of instances launched will depend on the alarm breached (e.g. 10% over nets one new instance, while 20% over nets two)

42
Q

Scheduled Scaling

A

set a schedule to scale out or in