Backpressure

Also known as: flow control.

A way for a slower consumer to make upstream producers reduce, pause or reject incoming work before queues and memory grow without bound.

Synthetic dataExamples on this page use synthetic data created for illustration.

Definition

Backpressure is a control mechanism through which a slower consumer makes upstream producers reduce, pause or reject incoming work. It keeps buffers, queues and memory bounded when arrival exceeds processing capacity. The signal may be explicit demand, a queue limit, a rate adjustment or an admission refusal.

In plain terms

If water enters a pipe faster than it can leave, pressure rises. A job system has the same problem: accepting every request while workers are saturated only moves the wait into a larger queue. Backpressure carries the capacity problem upstream, where new work can slow down, wait elsewhere or receive an honest rejection.

This is different from silently dropping work. A clear signal tells the producer what happened and, where appropriate, when to try again.

Example

A queue is limited to 1,000 waiting jobs. Workers complete 50 jobs per minute, while producers suddenly submit 120 per minute.

PolicyAfter 20 minutes
Unlimited acceptanceQueue grows by about 1,400 jobs
Backpressure at 1,000New submissions are slowed or rejected once the bound is reached

The bound protects the scheduler and gives operators a visible overload signal. It does not create capacity; the system still needs to reduce arrivals, add safe capacity or shed low-value work.

Common misunderstandings

  • “A large queue solves overload.” It delays the symptom while increasing latency and recovery time.
  • “Backpressure means failure.” It is controlled refusal or slowing that protects the rest of the system.
  • “Retries are the answer.” Immediate retries add more load; use a clear retry policy with Exponential Backoff where retry is appropriate.

References

  1. Reactive Streams . Reactive Streams.
  2. Reactive Streams JVM Specification . Reactive Streams.