Try
↑ ↓ move↵ openesc close

Curriculum · Module 01, Scaling a Service

Lesson 1 · 7 topics · 38 min · Beginner · 0/7 done

Load balancing

Why random assignment leaves servers idle while others queue, and how little information it takes to fix it.

What each topic covers

  • Even when servers have spare capacity, random arrivals leave some servers queued while others idle.
  • Round robin, random, least connections, and power of two choices, and what each one has to know.
  • Run random, round robin, least connections and power of two choices on identical arrivals and watch their p99 pull apart.
  • Measured p99 at 85 and 40 percent load, a slow server that round robin never relieves, and the overload no strategy fixes.
  • A worked M/M/1 and M/G/1 calculation of why waits explode past 80 percent load, and what pooling servers buys.
  • Why a request that waits for many backends feels each one's tail, and how hedged requests cut it for a few percent extra load.
  • Three checks on tail latency, unequal servers and the cost of least connections, plus the papers behind them.

Topics

  1. 1Why queues form4 min
  2. 2Four ways to pick a server4 min
  3. 3Race four strategies on one arrival stream7 min
  4. 4Why light load hides a bad balancer6 min
  5. 5The knee in the queueing curve7 min
  6. 6Fan-out turns a 1 percent tail into 63 percent7 min
  7. 7Pick the strategy for the fleet3 min

Practise this lesson

13 interview questions on load balancing, with worked answers and sources.

Practise these

Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms