Skip to content

Backpressure

Backpressure is a flow-control mechanism in which a slow consumer signals a fast producer to slow down, preventing buffer overflow, dropped messages or OOM crashes.

Definition

What it is

Backpressure is the pressure the consumer applies to the producer. Instead of the producer writing as fast as it can and overflowing the queue, the consumer says "wait, I'm full" and the producer blocks, drops, or buffers differently.

Why it matters

Systems without backpressure buffer until crash. Systems with backpressure degrade predictably: the producer slows down, the queue stays bounded, the system stays up.

Backpressure vs throttling vs rate limiting

Aspect

Backpressure

Throttling

Rate limiting

Who initiates

Consumer

Server

Server

Direction

Consumer → producer

Server → client

Server → client

Typical use

Streams, queues

CPU/IO overload

API abuse

Origin

Backpressure comes from fluid dynamics and mechanical systems. Software adopted it in the 2000s with reactive streams (ReactiveX, RxJava) and TCP congestion control.

Evidence

FAQ

Backpressure vs buffering?

Buffering hides the pressure until the buffer fills; backpressure tells the producer to slow down.

Backpressure vs dropping?

Dropping is one response to pressure; blocking, buffering and dropping are all valid backpressure responses.

Does TCP do it?

Yes, via window size and congestion control (AIMD).

Is it only for streams?

No: HTTP 429, queue depth, rate limits all implement forms of backpressure.

Connections

Etymology

Origin: compound

  • back (adverb): Old English bæc, "toward the rear"
  • pressure (noun): from Latin pressura, "pressing"

Semantic network

Backpressureflow-contrGraceful dQueueRetry

● broader ● narrower ● related

Broader

  • flow-control

Related

Used in the garden

Sources