This site only uses technical cookies required for it to work: no tracking, no profiling. Cookie Policy

Skip to content
All terms

What is backpressure?

The mechanism by which a system signals upstream that it cannot keep pace, instead of collapsing silently.

Backpressure is the mechanism by which a system signals to whoever is sending it data that it cannot process it as fast as it arrives, so the producer slows down or the system handles the overflow in a controlled way, instead of accumulating it until memory runs out or data is silently lost. It shows up whenever a consumer is structurally slower than the producer upstream: a traffic spike, a database slowed by a lock, a consumer restarting after a crash. Without an explicit mechanism, the speed gap accumulates in an unbounded buffer until memory is exhausted or latency makes the system unusable. A well-designed architecture does not avoid the spike, it makes it visible and manageable: it propagates the saturation signal back up the chain, uses bounded buffers instead of unbounded ones, and explicitly decides what happens when capacity runs out, block the producer, drop low-priority messages, or sample.

The concrete strategies, not just the principle

Backpressure is not a single technique but a family of strategies, and choosing among them is a design decision, not an implementation detail. The first is consumer-paced consumption, as in the pull model of Apache Kafka, where the consumer requests the next batch when it is ready, so the broker never has to push data faster than the slow side can read it. Note what this actually protects: pull bounds the broker-to-consumer leg, not the producer, which keeps appending while consumer lag grows until the retention limit. The second is upstream blocking proper, where the producer stops writing until capacity frees up. The third is bounded buffering with an explicit drop policy: a queue with a maximum capacity that, once full, applies a declared rule (drop-oldest, drop-newest, or priority-based dropping) instead of growing without limit. The fourth is sampling or throttling, useful when the accuracy of every individual event matters less than the overall health of the system, for example in high-frequency telemetry. The fifth is backoff, where the producer progressively slows down in response to saturation signals (429 errors, rising latency) instead of continuing to send at the original rate. Stream processing frameworks such as Apache Flink implement backpressure end to end across the entire pipeline: if a downstream operator slows down, the signal propagates automatically back to the source, which reduces its read rate without manual intervention.

An enterprise example

An e-commerce platform ingests clickstream events in real time to feed a recommendation engine: during a promotional event traffic grows tenfold within minutes, and the service that enriches each event with catalog data, a call to an external database, cannot keep up. Without backpressure, the intermediate queue grows without limit until the process runs out of memory and crashes, losing every buffered event at once, including the ones already paid for in processing cost. With a bounded queue and a backoff policy on the producer, the system instead slows down ingestion as the queue approaches its threshold, accepts higher latency for events during the spike, and stays up until traffic subsides: a measurable, communicable degradation, not a midnight incident with data loss.

Why it matters for decision makers

A system without backpressure is not faster than one that has it, it only shifts the moment of failure from a visible slowdown to a sudden crash, often at the highest-traffic moment, which is the most expensive one to absorb. The question to ask at design time is not "how much throughput can the system handle", but "what happens when throughput exceeds it": if the answer is "we don't know" or "the process goes OOM", the operational risk is real even when average load sits well under nominal capacity. Designing backpressure explicitly, instead of discovering it during an incident, costs less at event-driven architecture design time than in production, and it is what separates an enterprise data architecture from a prototype that only worked because it was never truly put under pressure.

  • Event-driven architecture (EDA) · Services exchanging facts that already happened through a broker, instead of calling each other directly and synchronously.
  • Apache Kafka · The open source distributed log for event streaming: topics split into partitions, read by independent consumer groups.
  • Garbage collection · The mechanism by which a runtime frees memory that is no longer reachable, and the pauses that hit p99 latency.
  • Throughput vs latency · Throughput measures how much work flows through a system, latency how long each single request takes.
  • Circuit breaker · A runtime mechanism that stops calls to a failing external service, preventing cascading failures downstream.

A term that hits close to home? Let's talk.

CONTACT ME