Elastic Load Balancer Flashcards Preview

AWS > Elastic Load Balancer > Flashcards

Flashcards in Elastic Load Balancer Deck (15)
Loading flashcards...
1
Q

What is the goal of high availability?

What are some of the ways you can achieve high availability?

A

To survive a data center loss

Use an autoscaling group in multi-az
Run a load balancer in multi az

2
Q

Why are health checks useful for load balancers?

A

They enable the load balancer to see which EC2 instances are healthy

3
Q

What are the 2 ways you can set up Elastic load balancers?

A

You can set up internal (private) or external (public) ELBs

4
Q

What is a common way to set up a security group for a load balancer?

A

Create a security group for the traffic from the user to the ELB, then set up another security group between the ELB and the EC2 instance, that security group should allow all traffic from the ID of the first security group be routed to the EC2 instance.

5
Q

What HTTP error will be returned if the ELB is at capacity or there is no registered target?

What should you check if the load balancer can’t connect to your EC2 instnace?

What can you see in ELB access logs?

What does cloud watch provide for ELB?

A

HTTP 503

The security groups

Logs of all access requests

Aggregate statistics Ex connections count

6
Q

What network protocols does a classic load balancer support?

Which protocols can be used for health checks?

How do you point to an classic load balancer?

A

TCP (Layer 4) and HTTP & HTTPS (Layer 7)

TCP or HTTP

Through a fixed hostname

7
Q

How do you define a classic load balancer?

A
  1. define a load bancer
  2. Assign security groups
  3. Configure security settings like HTTPS
  4. Configure health check
  5. Add ec2 instances
8
Q

What protocols does an application load balancer (ALB) support?

What types of load balancing does an application load balancer support

Does an application load balancer support re-directs?

A

Layer 7 (HTTP). Also supports http2 and WebSocket/gRPC

Load balancing across multiple applications across machines (target groups)

Load balancing to multiple applications on the same machine. Ex containers

Yes, for example, you can redirect from http to https

9
Q

What are some of the ways an application load balancer can route requests?

What’s the big difference between a classic load balancer and an application load balancer?

How does an application load balancer achieve routing to multiple applications?

At what level are the health checks run for an application load balancer?

A

Requests can be routed via, path, hostname, query string

An application load balancer is designed to support multiple applications. This is great for micro-services. A classic load balancer on the other hand can only support one application.

By being able to route to multiple target groups?

At the target group level

10
Q

What are some examples of target groups?

How do EC2 instances see the IP address of the client that is actually calling?

A

EC2 intances, ECS tasks, Lambda functions, IP Addresses

By checking the X-Forwarded-For header

11
Q

What layer does a network load balancer support?

What is the use-case for a network load balancer?

How do you connect to a network load balancer?

How could you configure a secondary way to connect through a Network load balancer?

A

Layer 4 (TCP & UDP)

They are used for extreme performance use cases. They are able to handle millions of requests per second with ~100ms latency

They expose a static IP address?

You can configure an elastic IP.

12
Q

What are sticky sessions?

What types of ELBs do sticky sessions work for?

What is one of the pitfalls of using sticky sessions?

What are the two types of cookies that can be used for sticky sessions

A

Sticky session allow the same client to always be redirected to the same instance behind the load balancer by providing a cookie?

Classic and application load balancers

Can cause an imbalance on some instances

Application based sticky session cookies that is generated by the target app.

Duration based cookies that is generated by the load balancer and active for all target groups for a period of time determined by the load balancer.

13
Q

How is traffic distributed with cross zone load balancing.

In a cross-zone load balancing scenario with ELB, what is the default configuration and pricing for inter AZ data for an Application load balancer?

What about for a network load blanacer?

What about for a classic load balancer?

A

With cross zone load blanancing, the load blancers will distribute the traffics across all ec2 instances in ALL ZONES

Cross zone load balancer is always on (can’t be disabled) and there is no charge for inter-az data

It is disabled for by default, you pay a charge for inter-az data if enabled

It is enabled by default through the console. It is disabled by default through the API/CLI, No charges for inter-az data

14
Q

What problem does Server Name Indication (SNI) solve?

How does it work?

Which load balancers does Server Name Indication work for?

A

SNI solves the problem of loading multiple SSL certificates on a web server to serve multiple websites.

The client must indicate the name of the host it wants to reach in the initial SSL handshake. Then the server will load the corresponding certificate.

ALB and NLB

Does not work for CLB

15
Q

What is connection draining?

What is the default time and and time range for connection draining?

A

Connection draining defines the time that the load balancer will wait to terminate inflight requests when an ec2 instance is deemed unhealthy.

The default is 300 seconds, but can be between 1 and 3600 seconds.