Node.js · interactive
Streams and backpressure
The producer wants to write faster than the consumer can read. The high water mark is the buffer's limit. Cross it, and the producer pauses.
Producer
writes 8/tick
Buffer
5 / 10 bytes
Consumer
reads 3/tick
Flowing. Wrote 8, read 3, 5 bytes waiting.
1 If the stream is flowing, the producer adds bytes to the buffer.
wrote 8 this tick · 8 B/tick in the panel
2 3 4
In production
Tools and technologies
Backpressure appears anywhere a producer can outrun a consumer — not only in Node streams.
Not tied to one language — use these names when you search docs or design a system.
- Apache KafkaService
Log-based streaming; consumers pull at their own pace.
Official site ↗ - RabbitMQService
Queues with prefetch and consumer acks to slow producers.
Official site ↗ - gRPC streamingProtocol
Flow-controlled bidirectional streams between services.
Documentation ↗ - Reactive StreamsStandard
Publisher / subscriber contract for demand-driven flow.
Official site ↗