Picture a road with a single lane merging from four on-ramps. If one driver floors the accelerator and never yields, everyone else waits indefinitely — a textbook starvation scenario. The same thing happens on shared network links: a single flow that sends as fast as it can can crowd out every other conversation on the wire.
Fair queueing is the family of scheduling algorithms that prevent this. The core idea dates to Alan Demers, Srinivasan Keshav, and Scott Shenker's 1989 paper on simulating a bit-by-bit round robin: instead of draining one sender's queue until it is empty, the router serves each flow in turn, one chunk at a time, so that every flow gets its share of the link capacity.
Two widely deployed variants keep the idea practical:
- Weighted Fair Queueing (WFQ) — assigns each flow a weight and serves it proportionally. A flow with weight 2 gets twice the bandwidth of one with weight 1.
- Deficit Round-Robin (DRR) — simpler to implement in hardware. Each flow accumulates a deficit counter every round; if a packet fits in the current credit, it is sent and the cost is deducted.
Both guarantee that no flow starves: even if one sender blasts packets at line rate, the others still receive their allocated share. That guarantee is surprisingly hard to get right — and the math behind it is where things get interesting.
Comments
Loading comments...