Advanced Details of Load Balancers
In this lesson1 sections
Advanced Details of Load Balancers
This lesson covers common load balancing algorithms and how load balancers (LBs) are organized hierarchically to distribute traffic across system tiers.
Algorithms of load balancers
Load balancers use specific algorithms to distribute client requests, which include:
Round robin scheduling: Requests are forwarded to servers sequentially in a repeating loop.
Weighted round robin: Useful when servers have varying capacities. Each node is assigned a weight; servers with higher weights receive a larger proportion of requests.
Least connections: Selects an eligible server with few active connections, often adjusted for weight. This can help when connection durations differ, but connection count is only a proxy for work.
Least response time: Directs traffic to the server with the lowest active response time, optimizing for latency. It is useful in performance-sensitive services.
IP hash: Hashes the client’s IP address to map them to a specific server. This is often used to maintain session stickiness.
URL hash: Maps a URL-derived key to a backend, which can keep requests for the same content together. Explicit path-based rules are a separate way to route different applications, such as video and text, to different backend pools.
Other variations exist, such as randomized or weighted least connections algorithms.
The rest of this lesson is for Premium members
Premium opens every lesson in this course, along with all questions and solutions on PracHub.