Backpressure on a Service Queue
Backpressure lets upstream work producers observe limited downstream capacity and reduce or delay submissions.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 4
- Reading time
- 1 min
In this article4 chapters
Trace a growing queue
If ten jobs arrive each second and six finish, an unbounded queue grows by about four jobs per second under those sustained rates. Bounded queue policies define what a fixed capacity can expose.
Choose a feedback mechanism
A service can reject or defer fresh work according to its public contract. Callers need a deliberate policy to avoid immediately repeating the same demand. See bounded retries.[1]
Simulate arrivals that exceed available slots
A service queue has room for five waiting records and is empty. Eight requests arrive before workers drain any. The last three need a bounded outcome, such as a rejection or deferred admission. Storing them in another unbounded list only moves the queue. See overflow policies.
Queue before burst: 0 of 5
First five admitted
Next three follow an explicit policy
Track acceptance and eventual completion separately
Communicate overload early enough for callers to respond
A producer can slow down when the receiver signals capacity limits. Test a burst and a sustained arrival rate above capacity. Verify that admitted work remains within its resource budget.