Systems Dictionary • Flow Control • Backpressure
Reactive Backpressure Flow Control
A flow control mechanism in asynchronous data streaming where a downstream consumer signals its processing capacity to upstream producers to prevent memory exhaustion and queue latency spikes.
Push Model vs Pull-Driven Demand
In naive push-based systems, fast producers flood slower consumers with messages, filling intermediate memory queues until the server crashes with an Out-Of-Memory (OOM) error. Reactive backpressure converts the pipeline into a demand-driven model:
Push (Fragile): [ Fast Producer ] == 50,000 msgs/sec ==> [ Slow Consumer (Capacity: 10,000) ] => OOM Crash
Reactive Demand: [ Consumer ] -- request(128) --> [ Producer ]
[ Producer ] == emits 128 msgs ==> [ Consumer ]
Producer suspends until Consumer signals next demand window.
Reactive Demand: [ Consumer ] -- request(128) --> [ Producer ]
[ Producer ] == emits 128 msgs ==> [ Consumer ]
Producer suspends until Consumer signals next demand window.
This principle mirrors TCP Sliding Window flow control and is implemented in modern reactive frameworks (such as Project Reactor, Akka Streams, and Rust Tokio channels).