Section 7: AWS Fundamentals: ELB + ASG Flashcards

1
Q

What is ELB?

A

ELB (Elastic Load Balancer) is a managed load balancer. They are servers that forward traffic to multiple servers.

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

What are the v2 (new generation) Load Balancers?

A

Application Load Balancer (ALB) compatible with HTTP, HTTPS, WebSocket

Network Load Balancer (NLB) compatible with TCP, TLS, UDP.

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

What is the Load Balancer that allows to deal with TCP and UDP traffic to your instances?

A

Gateway Load Balancer (GWLB) which operates at layer 4 - IP Protocol

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

How many ways can ELBs can be set up?

A
  • Internal (Private)
  • External (Public)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are Security Groups for ELBs?

A
  • HTTP (80)
  • HTTPS (443)
  • Users will be able to hit Load Balancer with classic HTTP, HTTPS
  • EC2 instances will only allow traffic from load balancer (security group)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What type of Load Balancer would you pick to handle millions of requests per second?

A

Network Load Balancer

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

Which Load Balancer should be chosen when is important to analyze the network traffic?

A

Gateway Load Balancer

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

Which Load Balancer has less latency (~100ms)?

A

Network Load Balancer.

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

Which Load Balancer has one static IP per Availability Zone?

A

Network Load Balancer.

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

What are target groups for Network Load Balancers?

A

Target groups are a group of EC2 instances.

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

Which Load Balancer uses the GENEVE protocol?

A

Gateway Load Balancer

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

Which port does the GENEVE protocol implement?

A

Port 6081

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

What are the target groups for Gateway Load Balancers?

A
  • Group of EC2 instances
  • IP Addresses (Must be private IPs).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are Sticky Sessions?

A

Also known as Session Affinity, a client is always redirected to the same instance behind a load balancer. Available for Application Load Balancer and Network Load Balancer.

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

How Sticky Sessions are implemented?

A

Cookie is sent from client to load balancer. The cookie used for stickiness has an expiration date that can be controlled.

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

What is a Pro and a Con of stickiness?

A

Pro: The user does not lose its session data.
Con: It may bring imbalance to the load over the backed EC2 instances.

17
Q

What are the types of Sticky Sessions?

A
  1. Application-based cookies
    • Custom cookie
      Generated by the target
    • Application cookie
      Generated by the load balancer
  2. Duration-based cookies
    Cookie generated by the load balancer
18
Q

How does With Cross-Zone Load Balancing work?

A

Each load balancer instance distributes evenly across all registered instances in all AZ.

19
Q

How does Without Cross-Zone Load Balancing work?

A

Request are distributed in the instances of the node of the Elastic Load Balancer

20
Q

Which type(s) of Load Balancer has cross-zone load balancing by default?

A

Application Load Balancing

21
Q

Why type(s) of Load Balancer has the cross-zone load balancing disabled by default?

A

Network and Gateway Load Balancers

22
Q

Which Load Balancer(s) will get charged if the cross-zone load balancing is enabled?

A

Network and Gateway Load Balancers

23
Q

What is connection draining?

A

AKA Deregistration Delay, while an instance is de-registering or becomes unhealthy, the LB will give enough time to complete requests. Once the instance is drained, the LB will stop sending requests to such instance.

24
Q

ALBs can route traffic to different Target Groups based on:

A
  • URL Path
  • Hostname
  • HTTP Headers
  • Query Strings
25
Q

What Load Balancer have a static IP address?

A

Network Load Balancer has one static IP address per AZ and you can attach an Elastic IP address to it.

26
Q

What is Server Name Indication?

A

Helps servers identify which SSL certificate to use when multiple domain names are hosted on the same IP address.

27
Q

What are the types of scaling policies?

A
  1. Simple Scaling Policy: A single scaling adjustment that is applied whenever a CloudWatch alarm is triggered. For example, a CloudWatch alarm to trigger when CPU usage exceeds a certain threshold, and then set up a simple scaling policy to add or remove a fixed number of instances when that alarm is triggered.
  2. Step Scaling Policy: Specific scaling adjustments for different levels of demand. For example, a step scaling policy to add one instance when CPU usage exceeds a certain threshold, add two instances when it exceeds a higher threshold, and so on.
  3. Schedule Scaling Policy: Specify a schedule for adding or removing instances. For example, set up a schedule scaling policy to add two instances every weekday at 9am, and then remove them at 5pm.
  4. Target Scaling Policy: Set a target value for a specific metric, such as CPU utilization or network traffic. The Auto Scaling group will then automatically adjust the number of instances to try to maintain that target value. For example, you could set a target scaling policy to maintain a target CPU utilization of 75%, and the Auto Scaling group will automatically add or remove instances as needed to keep the utilization at that level.
28
Q

What are the HTTP headers that are used by load balancers to provide information about the client’s connection to the origin server?

A

X-Forwarded-For: Identifies the IP address of the client that initiated the request.
X-Forwarded-Port: Indicates the port number that the client used to connect to the proxy or balancer.
X-Forwarded-Proto: Indicates the protocol (HTTP or HTTPS) that the client used to connect to the balancer. This is useful when the proxy or balancer is terminating SSL/TLS connections and forwarding plain HTTP traffic to the origin server. The X-Forwarded-Proto header allows the origin server to know whether the original request was made over a secure connection or not.