Backpressure
Pronunciation: BAK-presh-er
Also known as: Flow Backpressure, Consumer Backpressure
Definition
Backpressure is a flow-control mechanism that prevents producers from overwhelming consumers, queues, databases, or downstream APIs when work arrives faster than it can be processed. Backpressure regulates demand or admission; rate limiting usually enforces an external quota or policy at a request boundary.
Overview
Meaning and scope
Backpressure is a flow-control mechanism that prevents producers from overwhelming consumers, queues, databases, or downstream APIs when work arrives faster than it can be processed. Backpressure regulates demand or admission; rate limiting usually enforces an external quota or policy at a request boundary.
Mechanism and operation
The Backpressure implementation should bound attempts, preserve the original operation identity, and stop before retries amplify a dependency failure. A production implementation should bound queues, expose demand, slow or reject producers, prioritize critical payment events, shed nonessential load, isolate tenants, and define recovery behavior when capacity returns. Operational review of Backpressure should separate successful recovery from repeated attempts that only increase latency or load. Useful measures include queue depth, oldest-message age, consumer lag, rejected work, processing latency, saturation, and time spent in degraded flow-control modes. Configuration changes to Backpressure should be versioned and tested under burst, timeout, dependency failure, and restart conditions.
Practical payment example
A payment event queue grows during an outage, so consumers slow incoming work and prioritize safe recovery without dropping ledger changes.
Operational checks
Metrics for Backpressure should separate first-attempt success, recovered operations, exhausted attempts, duplicate prevention, and added latency. Manual intervention for Backpressure should begin only after automated status checks cannot determine a safe final outcome. The Backpressure policy should define which failures are retryable, how long the decision remains valid, and how duplicate effects are prevented.
Distinctions and limits
The principal risks include memory exhaustion, unbounded queues, excessive latency, dropped critical events, head-of-line blocking, hidden overload, and cascading failure across integrations. A Backpressure decision should use documented method semantics and provider error classes rather than message text alone.
Related reading
Related definitions: Rate Limiting, Message Queue.
Example
A payment event queue grows during an outage, so consumers slow incoming work and prioritize safe recovery without dropping ledger changes.
Comparison
The principal risks include memory exhaustion, unbounded queues, excessive latency, dropped critical events, head-of-line blocking, hidden overload, and cascading failure across integrations. A Backpressure decision should use documented method semantics and provider error classes rather than message text alone.
Key Takeaway
Bound queues, expose demand, slow or reject producers, prioritize critical payment events, shed nonessential load, isolate tenants, and define recovery behavior when capacity returns.
Sources
- Reactive Streams Specification — Reactive Streams Initiative (2026-08-03)
- Apache Kafka Documentation: Message Delivery Semantics — Apache Software Foundation (2026-08-03)
- Timeouts, retries, and backoff with jitter — Amazon Web Services (2026-08-03)