Load Balancer Flashcards
What is the primary purpose of a load balancer?
To distribute incoming network traffic across multiple servers to improve performance
What is the difference between a reverse proxy and a load balancer?
A reverse proxy forwards client requests to one or more servers
Name three key features of a reverse proxy.
Security (hiding server IPs)
What are the key features of a load balancer?
Distributing requests evenly
What is the purpose of load balancing algorithms?
To decide how to distribute incoming traffic across servers.
How does the round-robin algorithm work?
It sequentially distributes requests to servers in a loop.
When is the least connections algorithm most useful?
When requests vary in duration
How does the weighted round-robin algorithm work?
It assigns weights to servers based on capacity and distributes requests proportionally.
What is the use case for the IP hash algorithm?
Applications requiring session persistence by routing requests from a specific client IP to the same server.
What is the primary difference between Layer 4 and Layer 7 load balancing?
Layer 4 uses network information (IP/port)
Give an example of Layer 7 load balancing use cases.
URL-based routing
What protocols are supported by Layer 4 load balancing?
TCP and UDP.
Which load balancing layer has higher latency and why?
Layer 7
What is horizontal scaling?
Adding more servers to a system to handle increased traffic.
How does horizontal scaling benefit applications?
It provides scalability and fault tolerance by distributing traffic and reducing single points of failure.