/ THE IDEA
Those answering computers are called servers. A round-robin policy takes turns across servers. A least-outstanding-requests policy instead considers how many assigned requests have not yet finished. These are two different measurements: work assigned over time and work still present now. Suppose two identical servers handle one job at a time in this toy model. A long-running job can leave one server occupied while the other is idle. A policy that sees current unfinished work can direct a new request away from that occupied server. Health checks, test requests or other signals of availability, can also remove an unresponsive server from the eligible set.
THE FORMAL IDEA
round robin: next turn; least outstanding: smallest unfinished count
| Outstanding means assigned but not completed. Count requests at the same moment when comparing servers. | | A millisecond, ms, is one thousandth of a second. The following serial-service example is a teaching model, not a description of all web servers. |
|
RUN THE TINY EXAMPLE
Change one thing. Predict what happens.
At time zero, server A starts a 100 ms job; server B starts a 10 ms job. At 20 ms, A still has one unfinished job and B has none. If A is next in round-robin order, a new 10 ms job assigned there waits until 100 ms and finishes at 110 ms. Change only the choice rule: least outstanding sends it to idle B, where it finishes at 30 ms.
|
Both machines have the same speed, and the new job has the same cost. Its completion changes because one policy notices the queue that the other policy ignores. Counting completed or assigned requests alone would conceal that momentary imbalance.
/ SO WHAT?
A load balancer cannot create compute capacity from nothing. It can make existing capacity more useful by avoiding preventable idle-versus-busy mismatches and routing around detected failures. When evaluating a policy, inspect request duration and unfinished work, not merely totals per server. A server with fewer requests may still be doing more expensive work, so the best signal depends on what the application actually handles.
ONE CAVEAT |
| Real servers run jobs concurrently, and requests may differ greatly in cost. Least outstanding is only a proxy for remaining work; sessions, shared state, stale health information and the balancer’s own reliability complicate the choice. |
KEEP THIS
Balancing current unfinished work can reduce waiting when equal assignment counts fail to reflect how long individual requests occupy servers.
|
NEXT: Why a higher note is not simply a louder sound
|