Backpressure
PronunciationBAK-presh-er
Definition
Backpressure is a signal that tells a fast producer to slow down because the consumer or queue cannot keep up, instead of letting work pile up until something breaks.
Where you hear it
In streaming and queue systems (Kafka, Node streams, Go channels), API design and overload incidents.
Examples
The queue is full, so the API returns 429 to apply backpressure.
Without backpressure the worker ran out of memory.
The consumer slows the producer with a bounded queue instead of dropping messages.
Common mistake
Using an unbounded queue. It hides the problem until memory runs out. Bound it and push back.
Don't confuse with
Rate limiting, which caps how much each client may send. Backpressure reacts to how loaded the receiver is.
Say it at work
- In a meeting or chat
We need backpressure between the API and the workers.
- In an email or ticket
Shed load when the queue is above 80%.
Keep exploring
More in Architecture & Design