Backpressure
Backpressure is the signal a downstream component sends upstream to indicate that it cannot accept more work — explicitly slowing or rejecting incoming requests so the queue doesn't grow unboundedly. Systems without backpressure absorb spikes into ever-growing queues until they collapse under memory pressure or out-of-order processing.
Common backpressure mechanisms: HTTP 429 Too Many Requests with a Retry-After header, gRPC RESOURCE_EXHAUSTED status, Kafka consumer lag exceeding a threshold causing producers to slow, reactive streams' explicit demand signal. The pattern matters most at the edges of asynchronous systems where the producer can run faster than the consumer can sustain. The anti-pattern is unbounded buffering: the producer dumps into a queue, the consumer drains slowly, and the queue grows until it consumes all available memory and the system OOMs. Designing for backpressure means deciding, per dependency, what the consumer does when it can't keep up — drop, queue with cap, return error to upstream, or scale up.
Related terms
- Rate limiting
Rate limiting caps the number of requests a client can make to a service within a defined window — typically expressed as 'N requests per second' or 'N requests per minute per API key'.
- Saturation
Saturation is the measure of how full the most-constrained resource of a system is — CPU, memory, IOPS, network bandwidth, queue depth, file descriptors.
- Graceful degradation
Graceful degradation is the design property of a system that, when a dependency fails or saturates, returns reduced functionality rather than no functionality.