Elastic Load Balancer Flashcards

1
Q

How many types of load balancers are available in AWS, and what are they called?

A

Three:
Classic Load Balancer (CLB)
Application Load Balancer (ALB)
Network Load Balancer (NLB)

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

When is a v1 load balancer recommended?

A

Trick question - they are not recommended. They should be avoided and/or migrated to v2.

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

What is the main difference between ALB and NLB?

A

The ALB is a true layer-7 load balancer which understands HTTP, HTTPS, WebSocket etc. The NLB is not a layer-7 device and only understands TCP, UDP and TLS.

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

When would you choose an ALB over an NLB?

A

If your application used HTTP, HTTPS, etc you would use an ALB.

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

What’s the difference between an Internet-facing and an Internal LB?

A

The internet-facing LB assigns public and private IP addresses to the nodes. The internal LB only assigns private IP addresses to the nodes.

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

True or False: an internal load balancer has private IPs, whereas an Internet-facing load balancer has public IPs.

A

False. An Internet-facing load balancer has public AND private IPs.

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

What happens if a load balancer node in a subnet fails?

A

The service will automatically recover by spinning up another node.

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

True or False: there can only be one LB node per subnet.

A

False.
There can be multiple nodes per subnet, because the service automatically scales out according to demand.

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

True or False: the DNS A-record for an ELB points to the ELB front-end interface.

A

False. The DNS A-record resolves to the IP addresses of all nodes.

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

What is the function of listeners?

A

A listener checks for connection requests from clients, using the protocol and port that you configure, and forwards requests to a target group.

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

Whereabouts in the ELB configuration are Rules defined?

A

In the Listener.

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

What is the function of a target group?

A

A target group routes requests to one or more registered targets, using the protocol and the port number that you specify.

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

True or False: You can have one or more listeners on a v2 Elastic Load Balancer

A

True.

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

True or False: You can register a target with multiple target groups.

A

True.

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

True or False: Health checks are configured on a per Target Group basis.

A

True.
Health checks are performed on all targets registered to a target group.

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

How many rules per listener can be configured on a Network Load Balancer?

A

One.
Each listener has one rule.

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

On an Application Load Balancer, how many rules per listener can be configured?

A

A minimum of one - the default rule - must be configured for each listener. Additional rules can also be configured.

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

True or False: Internet-facing LB nodes can only access public instances.

A

False. Internet-facing LB nodes can distribute requests across public and private instances.

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

True or False: ELBs can load-balance all sorts of AWS services, not just EC2 instances.

A

True.

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

When deploying an ELB into subnets, what’s the minimum number of free IP addresses that must be available in each subnet?

A

Eight.

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

What is the AWS recommended minimum subnet size for ELBs?

A

/27

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

True or False: a /28 is sufficient for deploying an ELB.

A

True. But remember that the official AWS recommended minimum is /27. If the exam question has both /27 and /28 as possible answers, then choose /27. If /27 is not a possible answer, then /28 is probably the right answer.

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

What is the typical use for an internal LB?

A

They are placed between application tiers, allowing scaling between application tiers.

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

What problem did the introduction of cross-zone load balancing solve, and how?

A

Originally, a LB node in an AZ could only distribute requests across the registered instances in that AZ. This could result in uneven load distribution, particularly if an AZ had fewer instances.
Cross-zone LB allows LB nodes to distribute requests across all registered instances in ALL availability zones.

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

What is cross-zone load balancing?

A

The ability to load balance across availability zones.

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

True or False: For ALBs, is cross-zone load balancing enabled by default?

A

Yes

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

True or False: For NLBs, is cross-zone load balancing enabled by default?

A

No

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

With NLBs there are two places where cross-zone load balancing can be configured. What are they?

A
  1. At the load-balancer level.
  2. At the target group level.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

What is an ELB feature that can help with uneven distribution of load?

A

Cross-zone load balancing.

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

Can an internet facing LB distribute requests to private instances?

A

Yes

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

True or False: an internet facing LB cannot distribute requests to both private and public instances at the same time.

A

False. An internet facing LB can distribute requests to private or public instances. Instances do not have to be public in order to work with an internet-facing LB.

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

What does SNI mean and what does it do?

A

SNI = Server Name Identification.
It is an extension to the TLS protocol that allows a server to present multiple SSL/TLS certificates on the same IP address and port number.

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

True or False: NLBs can terminate TLS connections.

A

True.
The NLB can decrypt requests from clients before forwarding them to targets.

34
Q

What two settings are required in order for an NLB to terminate TLS connections?

A
  1. An SSL certificate must be specified.
  2. Select TLS as the protocol.
35
Q

True or False: to allow unbroken client-server encryption on an NLB, you need to create a TLS listener.

A

False. For unbroken encryption you should create a TCP listener.

Selecting TLS would result in the NLB terminating the encrypted connection, decrypting the client request then forwarding it to the server.

36
Q

What protocols does an ALB not support?

A

It does not support any other protocols than HTTP and HTTPS.

37
Q

Which type of load balancer supports connection draining?

A

Classic Load Balancer.

38
Q

On an ALB, where is Deregistration Delay configured?

A

On the Target group.

39
Q

When working with gRPC, which load balancer(s) can be used?

A

An ALB or NLB can be used, as gRPC uses HTTP as the underlying transport.

40
Q

What do ELB security policies govern, and what part of ELB do they apply to?

A

They govern which protocols and ciphers are acceptable. They apply to the Listener.

41
Q

With security policies, who controls the policy between the client and LB?

A

You do (as opposed to AWS)

42
Q

With security policies, who controls the policy between the LB and Targets?

A

AWS controls this.

43
Q

What is the 1 upside and 1 downside of newer security policies?

A

Upside: they are more secure.
Downside: they are less compatible.

44
Q

Why might you want to choose an older ELB security policy?

A

In order to ensure compatibility, e.g. with older web browsers.

45
Q

True or False: an ALB can be configured with TCP/UDP/TLS listeners.

A

False.

46
Q

True or False: an NLB can be configured with TCP/UDP/TLS/TCP_UDP listeners.

A

True.

47
Q

True or False: ALBs have higher performance than NLBs.

A

False. Because ALBs are layer 7 load-balancers, there’s more processing involved, and so they have higher latency.

48
Q

True or False: NLBs have higher performance than ALBs.

A

True.

NLBs are layer 4 load-balancers and therefore do not do as much processing, resulting in higher performance compared to ALBs.

49
Q

True or False: on an ALB, all incoming connections are terminated on the LB.

A

True.

50
Q

What is the best load-balancer type for end-to-end encryption?

A

Network Load Balancer, because ALBs don’t support unbroken encryption.

51
Q

How do you enable SSL pass-through mode on an ALB?

A

There is no such thing. ALBs do not support unbroken SSL/TLS between client and server.

52
Q

What is required on an ALB if HTTPS is used?

A

An SSL certificate.

53
Q

What order are ALB rules processed in?

A

Priority order.

54
Q

What layer 7 protocols does an NLB support?

A

None. The NLB is a layer 4 load-balancer.

55
Q

What protocols do NLB target groups support?

A

TCP, UDP, TLS, and TCP_UDP

56
Q

What NLB setting enables rules for headers, cookies and session persistence?

A

No such thing - NLBs are not aware of these HTTP/S features as they are layer 4 load-balancers.

57
Q

NLBs are faster than ALBs. NLBs typically have a latency that is what percentage of an ALB’s latency?

A

25% of an ALB’s latency.

58
Q

What health check (protocols) does an NLB support?

A

HTTP, HTTPS and TCP

59
Q

Why would you want to configure a static IP on an NLB?

A

For IP whitelisting purposes.

60
Q

True or False: NLBs support unbroken encryption.

A

True.

61
Q

What can be used with NLBs to provide services to other VPCs?

A

Private Link.

62
Q

If your situation requires or uses ANY of these five things, you should choose an NLB over an ALB.

A
  1. Unbroken encryption.
  2. Static IP for whitelisting.
  3. Fastest possible performance.
  4. Non HTTP or HTTPS based protocol.
  5. Private Link to other VPCs.
63
Q

True or False: Connection Draining is supported on all LB types.

A

False.

Connection Draining is only supported on the Classic Load Balancer.

64
Q

What does Connection Draining do?

A

It gracefully removes connections when an instance is going out of service.

65
Q

How does Connection Draining ensure that all connections are eventually terminated?

A

It prevents new connections from being established, whilst waiting for in-flight connections to complete. After a configurable timeout period (default = 300 sec) connections are terminated.

66
Q

What is the ALB/NLB/GWLB equivalent of Connection Draining called?

A

De-registration Delay.

67
Q

What are the minimum, maximum and default values of de-registration Delay?

A

0-3600 seconds, default = 300.

68
Q

What does a de-registration delay of zero do?

A

It disables timed de-registration delay, preventing in-flight connections from being timed out.

69
Q

What is X-Forwarded-For, and what is its purpose?

A

It’s an HTTP header used to identify the original IP address of a client connecting to a web server through an HTTP proxy or load balancer.

70
Q

What would multiple IP addresses in an X-Forwarded-For header mean?

A

It would signify that the HTTP packet has passed through multiple proxies and/or load balancers.

71
Q

In an X-Forwarded-For header how can you tell which IP address belongs to the originating host?

A

It is the left-most IP address in the list.

72
Q

Which ELB types is X-Forwarded-For supported on?

A

ALB and CLB.

73
Q

Which ELB types support the PROXY protocol?

A

CLB and NLB.

74
Q

Which versions of the PROXY protocol are supported by which ELBs?

A

CLB supports v1 (human readable).
NLB supports v2 (binary encoded).

75
Q

What does PROXY protocol do?

A

It is a way for a proxy server to communicate the original client IP address when forwarding connections to a server.

76
Q

What layer does PROXY protocol operate on?

A

The transport layer.

77
Q

True or false: The PROXY protocol is supported on all ELB types.

A

False. It is only supported on CLB and NLB.

78
Q

Is PROXY protocol typically used with TCP, UDP or both?

A

TCP.

79
Q

What does the Gateway Load Balancer (GWLB) do?

A

It distributes network traffic to ensure high availability and scalability for virtual appliances (eg. firewalls).

80
Q

What protocol does the GWLB use to encapsulate traffic to the NVAs?

A

The GENEVE protocol.

81
Q

Why does the GWLB use the GENEVE protocol to encapsulate traffic to the NVAs?

A

So that the traffic is completely unaltered, allowing it to be inspected in its original state.

82
Q

Which VPC is the GWLB deployed into?

A

The same VPC as the security appliances.