Skip to content
BENIBIX Learn

Backpressure

Data📥 Ingestion & StreamingEvent Streaming

Also known as Back Pressure, Flow Control (Streaming)

A slow reader asks a fast writer to slow down. Then no data is lost.

Think of it like

It is like asking a friend to slow down while you pass bricks. Your hands are full.

Example

A shop sends 1,000 events a second, but the step that writes to the warehouse takes 400. Backpressure slows the reads from the stream until it catches up.

Why it matters

Every pipeline has a slowest step. Backpressure keeps one slow step from crashing the whole thing.

Definition

Backpressure is a signal from a slow reader to a fast writer to slow down. Data waits in a buffer between them. If the writer sends more than the reader can take, the buffer fills up. Without backpressure, events get dropped or the memory runs out. With it, the writer waits until the reader catches up. Most stream engines handle it for you.
The reader is slower than the writer. The signal back keeps the buffer from overflowing.

Common mistake

Fixing it with a bigger buffer. If the reader is always slower, the crash just comes later.

Key takeaways

  1. 1
    Slowest step. The reader sets the pace.
  2. 2
    A signal back. Slow down travels upstream.
  3. 3
    Not a cure. A lasting gap needs more readers.