Load Balancer Flashcards
AWS has 4 kinds of managed load balancers what are they
Classic Load Balancer
Application Load Balancer
Network Load Balancer
Gateway Load Balancer
What does the Classic Load Balancer support
HTTP
HTTPS
TCP
SSL
What does the Application Load Balancer support
HTTP
HTTPS
Websocket
What does the Network Load Balancer support
TCP
TLS
UDP
What does the Gateway Load Balancer support
IP Protocol (Operates on layer 3)
What are some features of Application Load Balancer
Load Balancing to multiple HTTP applications across machines (target groups
Load Balancing to multiple applications on the same machine (containers). Fits with ECS well cuz ECS has dynamic port mapping
Supports redirects. Ex: Can redirect HTTP to HTTPS
You can also write routing rules for path, headers, query string etc
Target groups can be (EC2s, ECS tasks, Lambdas, or IP addresses)
ALB can route to multiple target groups and has health checks at the target group level
What are some features of Network Load Balancer
All to forward TCP and UDP traffic to your instances
Handle millions of requests per second
Less latency
It has one static IP per AZ and supports assigning Elastic IP
NLB are used for extreme performance
Target groups are (Ec2s, Ip addresses or ALBs)
Resolving Regional NLB DNS name returns the IP addresses for all the NLB nodes in the AZs
Resolving Zonal DNS Name: so it returns the ip address of one specific AZ
What are some features of Gateway Load Balancer
Deploy, scale and manage a fleet of 3rd party network virtual appliances like Firewalls, Intrusion Detection, Packet Inspection
Operates at Layer 3 (Network Layer) - IP Packets
So it is useful if you want to scan your traffic before it reaches your application. Here your target group will be your 3rrd party virtual appliances
Target groups (EC2s, IP addresses)
Explain Cross Zone Load Balancing
With Cross Zone Load Balancing, each load balancer distributes evenly across all registered instances in all the AZ. So if you have 2 instances in one AZ, they get 10% each, and if you have 8 in another, they get 10% each
What happens if you dont have Cross Zone Load Balancing
Without Cross Zone Load Balancing, each load balancer distributes evenly across all registered instances in just their respective AZ. So if you have 2 instances in one AZ, they get 25% each, and if you have 8 in another, they get 6.25% each
Which Load Balancers have Cross Zone Load Balancing enabled
Only the Application Load Balancer has Cross Zone Load Balancing Enabled by default and it cant be disabled
Both CLB and ALB wont be charged for inter AZ data if enabled
Gateway & Network will be charged for inter AZ data if enabled
Which load balancers implement sticky sessions (session affinity)
Both CLB and ALB
Which load balancers implement Least Outstanding Requests
Both CLB and ALB
Meaning the next instance to receive the request is the instance that has the lowest number of pending unfinished requests
Which load balancers implement round robin request routing algorithm
Both CLB and ALB
Which load balancers implement Flow Hash request routing algorithm
NLB
Selects a target based on the protocol, source/destination IP address, source/destination port and TCP sequence number