Load Balancers Flashcards

1
Q

What is an Elastic Load Balancer?

A

An aws managed load balancer. There are four types: classic, application, network, and gateway.

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

What are four types of Elastic Load Balancer?

A

1) Application load balancer
2) Network load balancer
3) Classic load balancer
4) Gateway load balancer

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

What is a Classic Load Balancer?

A

1) Operates at layer 4 and 7
2) Supports protocols: HTTP/HTTPS, TCP, and SSL/TLS.
3) No target groups. EC2 instances register directly with the load balancer.
4) Heath checks are: HTTP, HTTPS, or TCP.

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

What is an Application Load Balancer?

A

1) Operates at layer 7
2) Supports protocols: HTTP/HTTPS, WebSocket, HTTP/2, and gRPC
3) Load balances to multiple targets
4) Load balances to multiple application/ports on the same server
5) Support for custom HTTP responses
6) Supports redirects (HTTP to HTTPS traffic)

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

What is a Network Load Balancer?

A

1) Operates at layer 4
2) Supports TCP, UDP, and TLS
3) Handles 1 million requests per a second
4) Has one static IP per AZ
5) Static IP attaches to an ENI

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

What is a Gateway Load Balancer?

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

What is the health check HTTP code that is sent from the server(s) to the load balancer to verify health of thservers?

A

200 (OK)

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

An administrator is considering the different types of an AWS managed load balancer to setup load balancing for three web servers. For now, that type of traffic that would be load balanced are TCP/SSL connections. But there are future plans to include a chat function embedded in the UI. What is the best type of load balancer that meet these requirements?

A

Application load balancer because it can use the websocket protocol.

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

Which load balancer supports the websocket protocol?

A

Application load balancer

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

True or false: elastic load balancers only load balance traffic that is public facing.

A

False. Load balancing can be setup for either public or private access.

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

In order to enhance security with load balanced traffic, it is recommended to use two security groups: load balancer security group and EC2 instance security group. Is this the case?

A

Yes

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

Where is the EC2 instance security group expecting traffic if a user is accessing a web application? The load balancer does have a security group attached.

A

Source traffic is expected from the load balancer and not the end user.

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

What layer(s) does the classic load balancer operate at?

A

Layers 4 - 7

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

What is a listener?

A

It checks for connection requests from clients, using the protocol and port that you configure, and forwards requests to one or more registered instances using the protocol and port number.

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

What are health checks?

A

They used to monitor the health of the registered instances so that the load balancer only sends requests to the healthy instances.

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

You have 12 instances with ten running on AZ 1a and two instances in AZ 2b. The load balancer will distribute the traffic evenly between the two AZs. The EC2 instances in AZ 2b are slow to respond to client requests. What is the best solution to have traffic load balanced evenly between the two AZs?

A

Evenly divide the number of EC2 instances between the AZs with six on each AZ.

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

What will you need enable to distribute traffic evenly across all registered instances in all enabled Availability Zones?

A

cross-zone load balancing

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

For an application load balancer, what is the default routing algorithm?

A

Round robin

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

What load balancer has been deprecated since Aug 2022?

A

Classic load balancer with EC2 classic instances. Also known as version 1 elastic load balancer.

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

What is SNI?

A

Server Name Indicator
An extension to the Transport Layer Security (TLS) by which a client indicates which hostname it is attempting to connect to at the start of the handshaking process.

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

When configuring a load balancer, what is the recommended minimum subnet size?

A

/27

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

What is cross-zone load balancing?

A

Each load balancer node distributes traffic across the registered targets (EC2 instance) in all enabled Availability Zones.

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

If a load balancer is enabled between two AZs, how much traffic is load balanced between each AZ?

A

50% each

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

Why is it recommended to enable cross-zone load balancing if a load balancer sits between two AZ?

A

Since 50% of traffic is load balanced between the AZs, this would mean that an AZ with a smaller number of EC2 instances than the other AZ will still receive 50% of the traffic. This may degrade the EC2 instance if it has a high volume of traffic to process. Overall, this may cause intermittent slowness for some clients.

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

What is connection draining?

A

When instances are unhealthy or deregistered (taken out of the pool).

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

What is x-forwarded for?

A

They are HTTP headers that preserve the information from the client. Three things that are preserved:
1) client ip
2) client protocol (http or https)
3) client port (80 or 443)

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

What is proxy protocol?

A

It is a way to preserve the client’s ip using layer 4 TCP headers. This feature is used only on classic load balancer v1 and network load balancer v2.

28
Q

What is a routing algorithm?

A

This is a load balancing method that includes round robin, least outstanding requests, or flow hashing.

29
Q

What is connection idle timeout?

A

A timeout period for connectivity from client to the load balancer and/or connectivity between the load balancer to the EC2 instance.
This is used for CLB, ALB, and NLB.

30
Q

What is sticky sessions?

A

Using a cookie to send a client’s traffic to the same server as the original request.

31
Q

What is another term for sticky sessions?

A

Session affinity

32
Q

What is a target group?

A

This is a pool of EC2 instances behind the load balancer.

33
Q

What is the only type of load balancer that uses connection draining?

A

Classic load balancer

34
Q

What is deregistration delay?

A

Feature that stops sending traffic to instances that deregistering targets. It also allows existing connections to complete.

35
Q

What types of load balancers support deregistration delay?

A

1) Application load balancer
2) Network load balancer
3) Gateway load balancer

36
Q

True or false: deregistration delay is not a default setting.

A

False, it is turned on by default.

37
Q

Where is the deregistering delay configured?

A

On the target group

38
Q

What are two types of features that allows targets to gracefully close connections without taking anymore connections?

A

1) Connection draining
2) Deregistering delay

39
Q

What is the timeout value for both connection draining and deregistering delay?

A

300 seconds

40
Q

Where is connection draining configured?

A

On the load balancer itself (classic only)

41
Q

What are the 2 types of load balancers that support x-forwarded-for http headers?

A

1) Classic load balancer v2
2) Application load balancer

42
Q

True or false: network load balancers also support x-forwarded-for.

A

False, x-forwarded-for only works a layer 7.

43
Q

What are the two types of load balancers that support the proxy protocol?

A

1) Classical load balancer v1
2) Network load balancer v2

44
Q

What layer does proxy protocol work on?

A

Layer 4
There’s an additional tcp layer 4 header added that works with http/https and other upper level protocols.

45
Q

True or false: proxy protocol can support passthrough (packets left untouched by the load balancer).

A

True

46
Q

If the proxy protocol is unable to use layer 7 information to preserver the client’s ip, where is this information added?

A

The client’s ip is added into the additional TCP.

47
Q

Is the proxy protocol enabled by default if the target is configured with an IP?

A

No, it has to be enabled.

48
Q

What is the default connection idle timeout for both the CLB and ALB?

A

60 seconds

49
Q

What is the default connection idle timeout for the NLB?

A

TCP 350 seconds
UDP 120 seconds

50
Q

What is zonal shift?

A

It shifts a load balancer resource away from an impaired Availability Zone with a single action. This is a Route 53 feature.

51
Q

What is gRPC?

A

A remote procedure call protocol that integrates with a microservice (APIs) running over HTTP/2.

52
Q

What types of load balancer can only use gRPC?

A

1) ALB
2) NLB

53
Q

How can an ALB load balance traffic to an on-prem or vpc peered network?

A

1) Create network reachablity to the on-prem network or vpc peer.
2) Create a target group that points to the on-prem network or vpc peer.

54
Q

What is used to get to an internet facing load balancer?

A

DNS

55
Q

What is the DNS string for a public facing load balancer?

A

name-someName.region.elb.amazonaws.com
ipv6.name-someName.region.elb.amazonaws.com
dualstack.name-someName.region.elb.amazonaws.com

56
Q

What is the DNS string for a private load balancer?

A

internal-someName.region.elb.amazonsws.com

57
Q

What is the maximum number of IP addresses across all subnets that will be used for one ALB?

A

100

58
Q

For an ALB, what can be encompassed in a target group?

A

1) EC2 instances
2) ECS tasks
3) Lambda functions
4) Private IP addresses used to connect to peered vpc, on prem networks using direct connect or vpn

59
Q

True or false: ALB supports weighted target groups.

A

True

60
Q

What are the different targets that ALB can route to?

A

1) URL path
2) Hostname
3) Query string
4) HTTP header
5) Source IP

61
Q

True or false: microservices or container-based services are a great fit for ALBs.

A

True

62
Q

What are two features of ALB?

A

1) Use of SNI (server name indicator) to use multiple TLS certificates
2) Authenticate users before routing to targets

63
Q

An ALB has to route a query and a hostname to two different targets. How can this be achieved?

A

Apply rules to route the different traffic to different targets.

64
Q

For ALB, what is the last rule to be processed?

A

The default rule

65
Q

Which load balancer is used when high performance is needed to process traffic?

A

Network load balancer