PLAIN/TEXT — ISSUE 149/456 COMPUTER SCIENCE · FOUNDATION / LOAD BALANCING · ~4 MIN READING DATE: 2027-02-27 ARCHIVE: https://plaintext.click/newsletter/ SUBJECT: Why equal request counts can leave one server busier Why equal request counts can leave one server busier ==================================================== / START HERE A busy website can use several computers to answer incoming requests. A load balancer is a service that chooses which available computer should handle each connection or request. Its choice affects how evenly work is spread, especially when requests take different amounts of time. / WHY NOW Sending the same number of requests to every server sounds fair. It can still produce very unequal waiting if one server receives a long job while another quickly finishes several short ones. / 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. / SOURCE TRAIL [1] AWS — Application Load Balancer routing and health checks https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html NEXT: Why a higher note is not simply a louder sound --- HARD IDEAS. PLAIN TEXT. You are receiving this because you asked for one clear computer-science or physics idea each day. Unsubscribe: https://plaintext.click/unsubscribe View in browser: https://plaintext.click/newsletter/2027/02/2027-02-27-load-balancing.html From: Plain/Text / Brickston Consulting · 30 N Gould St Ste N, Sheridan, WY 82801 US · knowledge@plaintext.click