When fast meets slow
Backpressure is the mechanism by which a slow consumer signals a fast producer to slow down. Without it, a producer that outpaces its consumer fills buffers until memory runs out and latency soars, often taking the whole system down.
The naive instinct is to add a bigger buffer, but that only delays the collapse and makes latency worse when it finally arrives. The real fix is to push the pressure back to the source.
How systems push back
- Blocking the producer until the consumer is ready, common in bounded queues.
- Dropping or shedding excess work when keeping it would be worse.
- Signaling a request count, where the consumer tells the producer how much it can accept.
Why it matters
Backpressure keeps a system inside its safe operating range under overload. A service without it degrades catastrophically, while a service with it degrades gracefully by slowing or shedding load. Load shedding paired with clear limits is often kinder to users than an unbounded queue that eventually times out every request.
Key idea
Backpressure makes a system degrade gracefully under overload instead of collapsing when buffers fill.