Backpressure
- Categories
- Systems
A flow-control mechanism in which a consumer that cannot keep up signals the producer to slow down, rather than dropping data or exhausting memory. It bounds work in progress by propagating "not so fast" back up the pipeline.
Why it Matters
When producers outpace consumers, something has to give: an unbounded queue eventually exhausts memory, and silently dropping data loses it. Backpressure makes the limit explicit and pushes the slowdown back to the source, keeping the system stable under overload.
Signals
- Ever-growing queues or buffers.
- Out-of-memory under load spikes.
- Data silently dropped when a stage falls behind.
Benefits
Bounded memory and latency under load, and graceful handling of overload instead of collapse.
Risks
Backpressure propagating all the way to users as refused requests (sometimes correct, sometimes not); deadlock if the feedback is mishandled; masking a real capacity shortfall.
Tensions
Absorbing bursts versus bounding work: buffering smooths spikes but adds latency and risk, while backpressure protects the system but pushes the problem upstream.
Examples
A slow consumer pausing a fast producer until it catches up; a server queuing or shedding load when a downstream stage is saturated.