A website gets a flood of requests. Behind it sit several servers, and the requests must be spread among them. If one server gets swamped while others sit idle, that server slows to a crawl and users feel it. The goal is to share the work so the busiest server finishes as soon as possible.
The simple instinct is round-robin: hand jobs out one by one, taking turns. It's fair by count — but jobs aren't the same size. A few heavy requests landing on the same server can overload it even while the count looks even.
That's load balancing, and in its core form — distribute jobs to minimize the maximum load (the makespan) — it's a cousin of scheduling and bin packing, and it's NP-hard. But here's the good news that keeps systems running: simple rules get provably close to perfect balance.
Comments
Loading comments...