Backpressure¶
When a consumer cannot process data as fast as a producer sends it, the producer must be slowed down or data must be dropped; buffering only delays the inevitable if rates are mismatched, eventually causing memory exhaustion or data loss.
Tension Addressed¶
Throughput vs. Ordering (backpressure trades throughput for preventing overflow)
Recognizable As¶
TCP flow control; reactive streams; pull-based APIs; bounded queues that block producers; rate limiters; "slow down" signals; HTTP 429 responses
Canonical Sources¶
Reactive Streams Specification (2014); Jacobson, "Congestion Avoidance and Control" (1988); Little's Law (queueing theory)
Transfers To¶
Network Protocols (TCP/IP flow control), Stream Processing (reactive streams), Database Connections (connection pool exhaustion), Message Queues (bounded queues)
Backpressure is a manifestation of Little's Law: items in system = arrival rate x time in system. If arrival rate exceeds processing rate, items accumulate indefinitely. The only sustainable solutions are: slow the producer, speed up the consumer, or drop data.