Backpressure water-network game

BACKPRESSURE

01 · CONTROLS

Keys: 1–2 pick a valve · ↑ ↓ open or close it · B backpressure · S spillway · P pause · F speed · R restart

02 · METERS

INFLOW
0.0 u/s
TO CITY
0.0 u/s
QUEUE DEPTH
0 u
SHED
0%
CITY
STEADY
TIME LEFT
0 s

03 · GO DEEPER

Every piece of the valley is a queueing idea you can meet in real software:

BASIN = BUFFER
Holds a burst so the stage downstream sees a steady rate. A buffer that never drains only adds delay.
VALVE = RATE LIMIT
Caps how fast work may leave. Many limiters, like the RFC 2697 token-bucket meter, also allow short bursts; these valves are a plain constant-rate cap.
LINK = BACKPRESSURE
The downstream stage signals how much room it has and the upstream stage never sends more, so the queues in between stay bounded.
SPILLWAY = LOAD SHEDDING
When the producer cannot slow down and the buffers are full, drop the excess on purpose instead of letting the system overflow.
CITY = CONSUMER
Needs a steady rate inside its band: too little is a drought, too much is a flood.

GO DEEPER: QUEUE FORGE → Tune workers, retries, backoff and dead-letter queues in the Lab’s systems challenge room.

The valley, its city and its storms are fictional. The flow model is a simplified teaching model of queues, not real hydraulics.

SOURCES

  1. RFC 7567 — IETF Recommendations Regarding Active Queue Management (2015) Queues absorb bursts when arrivals briefly outpace departures; a queue that stays full only adds delay (§1.2, §2).
  2. RFC 2697 — A Single Rate Three Color Marker (1999) Token-bucket metering: tokens refill at a set rate up to a burst size (§3).
  3. Reactive Streams Specification 1.0.4 Backpressure: a subscriber signals demand and a publisher never sends more than was requested (rules 1.1 and 2.1).
  4. Site Reliability Engineering (Google / O’Reilly), ch. 21 “Handling Overload” Reject what you cannot serve, early and cheaply, instead of falling over (ch. 21).
  5. Site Reliability Engineering (Google / O’Reilly), ch. 22 “Addressing Cascading Failures” Load shedding drops a share of traffic as a server approaches overload (ch. 22).
  6. J. D. C. Little, “Little’s Law as Viewed on Its 50th Anniversary”, Operations Research 59(3), 2011 Little’s Law, L = λW: average items in a system = arrival rate × average time spent inside.