← Lessons

quiz vs the machine

Platinum1750

System Design

Backpressure

How a system tells a fast producer to ease off before queues explode and everything falls over.

4 min read · advanced · beat Platinum to climb

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.

Check yourself

Answer to earn rating on the learn ladder.

1. Why is simply adding a bigger buffer a poor answer to overload?

2. What does backpressure achieve under overload?