Load Balancer Algorithm
ELI5 — The Vibe Check
Load balancer algorithms decide which server gets the next request. Round robin takes turns. Least connections picks the least busy server. Weighted lets you send more traffic to beefier servers. It's the traffic cop at the server intersection.
Real Talk
The strategy a load balancer uses to distribute incoming requests across backend servers. Common algorithms include: Round Robin (sequential rotation), Weighted Round Robin (proportional distribution), Least Connections (least active), IP Hash (client affinity), Random, and Least Response Time.
When You'll Hear This
"We switched from round robin to least connections because some requests take 10x longer than others." / "Use IP hash for session affinity when you can't externalize session state."
Related Terms
Consistent Hashing
Consistent Hashing distributes data across servers so that when you add or remove a server, only a small fraction of data needs to move. Normal hashing?
Load Balancer
A load balancer is like a traffic cop for servers.
Round Robin
Round Robin is the simplest load balancing strategy: send request 1 to server A, request 2 to server B, request 3 to server C, then back to server A, and s...
Sticky Session
Sticky sessions make sure a user always gets routed to the SAME server, like getting the same cashier every time you visit a store.