ELB - Elastic Load Balancing Flashcards

1
Q

What is an ELB?

A

EC2 Load balancer is a managed load balancer.
Load balancers are servers that forward internet traffic to multiple servers (EC2 Instances) downstream.
• It costs less to set up your own load balancer but it will be a lot more effort on your end.
• It is integrated with many AWS offerings/services.

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

Why is useful ELB Health Checks?

A

They enable the load balancer to know if instances it forwards traffic to are available to reply to requests

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

How does the ELB Health Check works?

A
  • The health check is done on a port and a route (/health is common)
  • If the response is not 200 (OK), then the instance is unhealthy
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the 3 kinds of managed Load Balancers?

A
  • Classic Load Balancer
  • Application Load Balancer
  • Network Load Balancer
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How would you create ELB SGs?

A

ELB SG: receive HTTPS and HTTP from anywhere and restrict EC2 instances behind the ELB to accept just ELB SG private HTTP requests on port 80

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

Can you scale an ELB?

A

Yes, but not instantaneously, you need to contact AWS for a “warm-up”

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

What means ELB 503 error?

A

At capacity or no registered target

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

What to do if your ELB can’t connect to your appllication?

A

Check your SGs

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

What can you use for ELB monitoring?

A

ELB access logs and CloudWatch Metrics

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

What does provide a Classic Load Balancer?

A

It provides a fixed hostname and basic load balancing across multiple Amazon EC2 instances

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

At what level does operate a Classic Load Balancer?

A

operates at both the request level (layer 7, HTTP, HTTPS) and connection level (layer 4, TCP)

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

What is intended for a Classic Load Balancer?

A

is intended for applications that were built within the EC2-Classic network

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

What does provide an Application Load Balancer?

A

It provides a fixed hostname and advanced request routing to target groups based on request:

  • path
  • hostname
  • query string, headers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

At what level does operate an Application Load Balancer?

A

operates at request level (layer 7, HTTP, HTTPS, WebSocket)

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

What is intended for an Application Load Balancer?

A

modern application architectures, including microservices and containers

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

What would you need roughly to replace an Application Load Balancer in front of several applications with a Classic Load Balancer?

A

multiple Classic Load Balancer per application

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

What feature does provide an Application Load Balancer to communicate to ECS?

A

A port mapping feature to redirect to a dynamic port in ECS

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

What are the Application Load Balancer’s target groups?

A
  • EC2 instances (can be managed by an ASG) – HTTP
  • Lambda functions – HTTP request is translated into a JSON event
  • IP Addresses – must be private IPs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

At what level does Health Check occur on Application Load Balancers?

A

At target group level

20
Q

How an application server behind an Application Load Balancer can see the IP, port and protocol of the client directly?

A
  • The true IP of the client is inserted in the header X-Forwarded-For
  • We can also get Port (X-Forwarded-Port) and proto (X-Forwarded-Proto)
21
Q

What does provide a Network Load Balancer?

A

High performance load balancing of Transmission Control Protocol (TCP), User Datagram Protocol (UDP) and Transport Layer Security (TLS) traffic

22
Q

At what level does operate a Network Load Balancer?

A

At connection level (layer 4, TCP, UDP, TLS)

23
Q

What is intended for a Network Load Balancer?

A

extreme performance

24
Q

What ELB is not free tier?

A

Network Load Balancer

25
Q

What is Load Balancer Stickiness?

A

the same client is always redirected to the same instance behind a load balancer

26
Q

What ELB are compatible with Stickiness?

A

Classic and Application Load Balancers

27
Q

What can you control in an ELB Stickiness configuration

A

The expiration date of the cookie used

28
Q

What could cause ELB Stickiness?

A

May bring imbalance to load

29
Q

What is a common use case for ELB Stickiness?

A

make sure the user doesn’t lose his session data

30
Q

What is Cross-Zone Load Balancing?

A

A configuration where each load balancer instance distributes evenly across all registered instances in all AZ

31
Q

What is the behavior if Cross-Zone Load Balancing is disabled?

A

each load balancer node distributes requests evenly across the registered instances in its Availability Zone only

32
Q

How is Cross-Zone Load Balancing by default on ELBs?

A
  • Classic Load Balancer: Disabled by default
  • Application Load Balancer: Always on (can’t be disabled)
  • Network Load Balancer: Disabled by default
33
Q

What SSL certificates use ELBs?

A

an x.509 certificate, but you can create or upload your own certificates alternatively

34
Q

What you must specify for ELB’s HTTPS listeners?

A

A default SSL certificate

35
Q

What can you do to support multiple domains on ELBs from security perspective?

A

you can add optional list of certs

36
Q

How can the ELB redirect to correct hostname in case it is in front of many different hostnames?

A

clients can use SNI to specify the hostname they reach

37
Q

How can an ELB support older versions of SSL / TLS?

A

It provides the ability to specify a security policy

38
Q

What problem solves SNI?

A

solves the problem of loading multiple SSL certificates onto one web server (to serve multiple websites)

39
Q

What is SNI?

A

Server Name Indication is a “newer” protocol, and requires the client to indicate the hostname of the target server in the initial SSL handshake

40
Q

With what ELB does SNI work?

A

ALB and NLB (newer generation) and CloudFront

41
Q

What’s ELB Connection Draining?

A

Time to complete “in-flight requests” while the instance is de-registering or unhealthy

42
Q

What is the name of Connection Draining for ALBs and NLBs

A

Deregistration Delay

43
Q

What is the default and range values of Connection Draining?

A

Between 1 second and 1 hour, the default is 5 minutes

44
Q

Can you disable Connection Draining?

A

Yes, set it to 0

45
Q

Which ELB does provide a fixed IP address?

A

NLB (helpful for whitelisting specific IP)

46
Q

What is exposed by a load balancer?

A

a single point of access (DNS) to your application

47
Q

What are 4xx and 5xx errors in ELBs?

A
  • 4xx errors are client induced errors

- 5xx errors are application induced errors