Elastic Load Balancing (ELB) Flashcards

1
Q

What is Elastic Load Balancing?

A

Elastic Load Balancing automatically distributes incoming traffic across multiple targets, such as Amazon EC2 instances. This can be done across multiple AZs.

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

What are the three different types of Load Balancers in ELB?

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

What is Application Load Balancing in ELB?

A

Load balancing of HTTP/S traffic, operating at Layer 7 and are application aware.

Intelligent load balancing

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

What is Network Load Balancing in ELB?

A

Operates at the connection level (Layer 4). Network Load Balancers are capable of handling millions of requests per second while maintaining ultra-low latencies.

Performance load balancing

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

What is Classic Load Balancing in ELB?

A

Legacy load balancers (which operate between Layer 4 and Layer 7). You can balance HTTP/S applications and use Layer 7-specific features, such as X-Forwarded and sticky sessions.

Classic/dev/test load balancing

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

Can AWS Load Balancing be configured with health checks?

A

Yes, health checks periodically send requests to load balancers’ registered instances to test their status. The load balancer performs the health check on all registered instances, whether the the instance is in a health state or an unhealthy state. The load balancer only routes request to healthy instances; it will resume routing request to the instance once it has been restored to a healthy state.

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

What is the status of instances that are healthy at the time of a health check in ELB?

A

InService

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

What is the status of an instance that is unhealthy at the time of a health check in ELB?

A

OutOfService

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

What is Layer 7 load balancing?

A

An Application Load Balancer functions at the application layer – the seventh layer of the Open Systems Interconnection (OSI) model. After the load balancer receives a request, it evaluates the listener rules in priority order to determine which rule to apply, and then selects a target from the target group for the rule action.

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

What are Listeners in ELB?

A

Listeners check for connection requests from clients, using the protocol and port you configure. You define rules that determine how the load balancer routes requests to its registered targets.

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

What does a rule consist of in load balancing in ELB?

A

Each rule consists of a priority, one or more actions, and one or more conditions.

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

How do rules work in ELB?

A

When the conditions of a rule are met, then its actions are performed. You must define a default rule for each listener, and you can optionally define additional rules.

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

What are Target Groups in ELB?

A

Each Target Group routes request to one or more registered targets, such as EC2 instances, using the protocol and port number you specify.

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

If you are given an example where you have a user and they are browsing to a URL that hits Route 53 and that is sending traffic to an application load balancer, and the application load balancer needs to send traffic to the web servers in us-east-1, but if they have a path that says myurl.com/images, then the application load balances needs to send traffic to other EC2 instances in another target group in another availability zone. How do you enable that?

A

Enable path patterns

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

What is the limitation of application load balancers in ELB?

A

They only support HTTP and HTTPS, no other listeners

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

How do you enable HTTPS Load Balancing in ELB?

A

To use an HTTPS, you must deploy at least one SSL/TLS server certificate on your load balancer. The load balancer uses a server certificate to terminate the frontend connection and then decrypt requests from clients before sending them to targets.

17
Q

Is AWS a certificate signing authority where you can request SSL certificates?

A

Yes

18
Q

What is Layer 4 Load Balancing?

A

A Network Load Balancer functions at the fourth layer of the Open Systems Interconnection (OSI) model. It can handle millions of requests per second.

19
Q

How does a Network Load Balancer work in ELB?

A

After the load balancer receives a connection request, it selects a target from the target group for the default rule. It attempts to open a TCP connection to the selected target on the port specified by the listener configuration. A listener checks for connection requests from clients, using the port and protocol you configure.

The listener on a Network Load Balancer then forwards the request to the target group. There are no rules, unlike with Application Load Balancers.

Each Target Group then routes requests to one or more registered targets, such as EC2 instances, using the protocol and port you configure.

20
Q

What ports and protocols are supported in Network Load Balancers in ELB?

A

Protocols: TCP, TLS, UDP, TCP_UDP
Ports: 1-65535

21
Q

Can you use encryption in Network Load Balancers in ELB?

A

Yes, you can use a TLS listener to offload the work of encryption and decryption to your load balancer so your applications can focus on their business logic.

If the listener protocol is is TLS, you must deploy exactly one SSL server certificate on the listener.

22
Q

What are the best use cases for Network Load Balancers in ELB?

A

Network Load Balancers are best suited for load balancing of TCP traffic where extreme performance is required. Operating at the connection level (Layer 4), Network Load Balancers are capable of handling millions of requests per second, while maintaining ultra-low latencies. Other use cases are where you need protocols not supported by Application Load Balancers.

Use for extreme performance!

23
Q

How do Classic Load Balancers work?

A

Classic Load Balancers are the legacy load balancers. You can balance HTTP/S applications and use Layer 7 specific features such as X-Forwarded and sticky sessions. You can also use strict Layer 4 load balancing for applications that rely purely on the TCP protocol.

24
Q

What is an X-Forwarded-For header in ELB?

A

When traffic is sent from the load balancer, the server access logs contain the IP address of the proxy or load balancer only. To see the original IP address of the client, the X-Forwarded-For request header is used.

25
Q

What is a Gateway Timeout (504) in Classic Load Balancer in ELB?

A

If your application stops responding, the Classic Load Balancer responds with a 504 error. This means the application is having issues. This could either be at the web server layer or database layer.

26
Q

If you see a scenario where you are receiving a Gateway Timeout (or 504 error), what should you recommend?

A

A 504 error means that the application is not responding within the idle timeout period, which means you should troubleshoot at the application (web server or database layer) as they are likely having issues.

27
Q

What are Sticky Sessions in ELB?

A

Classic Load Balancers route each request independently to the registered EC2 instance with the smallest load.

Sticky Sessions allow you to bind a user’s session to a specific EC2 instance. This ensures that all requests from the user during the session are sent to the same instance.

28
Q

What problems can Sticky Sessions in ELB cause?

A

Scaling issues: If the instance that the user session is attached to goes down, it means that the load balancer is still going to route the request of the end user to that EC2 instance, and the user will get an error.

29
Q

What type of load balancers allow Sticky Sessions to be enabled in ELB?

A

Classic Load Balancers and Application Load Balancers, although Application Load Balancers send traffic at the target group level, not instance level.

30
Q

If you are given a scenario where you remove and EC2 instance from a pool but the load balancer continues to direct traffic to that EC2 instance, what would you recommend doing to troubleshoot?

A

Disable sticky sessions

31
Q

What is Deregistration Delay in ELB?

A

It allows Application Load Balancers to keep existing connections open if the EC2 instances are de-registered or become unhealthy. This enables the load balancer to complete in-flight requests made to instances that are de-registering or unhealthy.

32
Q

What is the equivalent of Deregistration Delay in Classic Load Balancers in ELB called?

A

Connection Draining

33
Q

How can you immediately close connections to instances in a load balancers that are de-registering or unhealthy?

A

Disable Deregistration Delay (or Connection Draining in Classic Load Balancers)