Skip to content
WebsiteHosting.com

concept Delivery & performance

Backpressure and queueing collapse

A queue buys time, not service capacity. Follow five ticks of arrivals, completions, and rejections to see why accepting more work need not deliver more useful answers.

Latest recorded source check · P0165

What it means

Backpressure limits how much work a service accepts when requests arrive faster than it can finish them. A caller may have to slow down, wait before sending more, or take a refusal. Accepting every request instead can make the queue longer without making the service any faster. A request that waits past its client's deadline can consume service time without delivering a useful answer.

Try it

Simulation: Start with an empty queue, 15 units of work arriving per tick, service capacity of 10 units per tick, and room for 20 units to wait. Over five ticks, the counts left waiting are 5, 10, 15, 20, 20. The service completes 50 units and rejects 5. Notice the last two counts: the queue is full at the end of both ticks, but only the fifth tick has a rejection.

Backpressure and queueing collapse

Explain why accepting more work can increase latency and eventual failures

Simulation
Modeled outcome: Bounded

Queue bound limits pending work; excess arrivals are rejected in this model.

Backpressure and queueing collapse: synthetic scenario inputs
Replaces all inputs with the documented starting example and the indicated change. Reset restores the starting example.
Bounded queue across ticks

Work accounting

  1. Arrival per tick15
  2. Service capacity per tick10
  3. Total rejected5
TickQueuedrequestsQueue limitrequests
1520
21020
31520
42020
52020

Only queue occupancy and total rejected work are explicit evaluator outputs. Rejected requests and a bounded queue do not establish client latency or useful completions.

Evaluated inputs

Required scenario evidence
provided
Ticks
5 count
Arrival work per tick
15 count
Service work per tick
10 count
Queue capacity
20 count

Discrete fixed service and queue capacity, rejection after service within tick, no real retries, deadlines or queueing distribution.

About this model

The controls set only a local, bounded scenario. The computed branch is not a verdict about a live system. Inputs listed as not evaluated did not participate in this branch after validation.

Reset restores the original inputs. It does not change the open or closed state of help or FAQ answers.

Change only Arrival work per tick from 15 to 8. Now the counts left waiting are 0, 0, 0, 0, 0. Service capacity has not changed: all 8 units fit into each tick's allowance of 10, so all 40 finish and none are rejected. Use Reset to return to the five-tick starting example. These are synthetic counts, not measurements of a server.

What happens when the queue fills

In each tick, new arrivals join the work left over from the previous tick. The service does as much of that combined work as its capacity allows. Only then does the queue limit apply: the work that fits waits for the next tick, and the excess is rejected.

In the starting example, tick four begins with 15 units waiting. Another 15 arrive and 10 finish, leaving exactly 20. Nothing needs to be refused. Tick five begins with those 20 units instead. After 15 arrive and 10 finish, 25 would have to wait. The queue keeps 20 and rejects 5. A flat queue count here means that excess work is being turned away, not that demand has fallen.

What if the queue had room for 25 instead of 20? At the end of tick five, all 25 remaining units would fit. Rejections over the run would fall from 5 to zero, but completions would stay at 50. The five units spared rejection would still be waiting. A queue can hold work from a temporary burst until service catches up. If arrivals stay at 15 and service stays at 10, however, the work waiting would grow by 5 every tick without a bound. A larger finite queue postpones the first refusal; it does not remove the mismatch.

With arrivals equal to service capacity, a queue initially empty stays empty in every tick. With the default excess of five requests per tick and a queue limit of 20, the fifth tick retains 20 and rejects five. Rejections prevent an unbounded waiting count; they do not prove that the admitted requests finish before a client deadline. The model exposes queue occupancy and rejection counts, not client completion timestamps.

In practice

Throughput counts work finished per interval. Latency measures how long an individual request takes, including time spent waiting. Under sustained overload, the service can keep finishing work at its usual rate while clients wait longer or give up. The simulation counts work left waiting and work rejected. It does not measure individual waits, simulate deadlines, or determine which completions a client could still use.

To interpret a real queue, compare arrivals, completions, rejections, and the change in work waiting over the same interval. Separate first attempts from retries: a refusal protects a local queue, but if the caller immediately sends the work again, the service faces another attempt. The simulation keeps arrivals fixed; it does not model that response. In a real service, bound retries and look at time spent in the queue alongside completions that reached clients before their deadlines.

A lower rejection count is not by itself a reason to enlarge a queue. Ask where the work went: did more requests finish in time, or were more of them still waiting?

Frequently asked questions

Editorial questions based on the listed sources and explicitly labeled local examples.

Is backpressure always rejection?

No; it may slow producers or defer admission.

Does a queue add capacity?

No. A queue stores waiting work up to its limit. In the fixture, matching arrival and service capacity leaves an initially empty queue empty; extra waiting space does not raise that capacity or prove timely completion.

Can retries defeat backpressure?

Yes. Rejected requests that are retried add work back to the constrained service. Without a bounded retry policy this can undermine overload protection. Distinguish original demand from repeated attempts when measuring capacity.

Does this prove no outage?

No. The model tracks admission, backlog and completed work for stipulated arrivals and capacity. It does not establish availability under real workloads or failures.

Sources & model boundaries

Primary references used for this explanation. The interactive example is an educational model, not a live check.

  1. Google SRE: Handling overload

    Handling overload: retries. Graceful rejection can preserve useful throughput, but rejection and retries consume resources. Retry budgets can constrain amplification.

    Checked .

  2. Google SRE: Addressing cascading failures

    Retries; Latency and deadlines. The service can waste work on requests whose client deadline has already passed. Limit retries and assess queue residence time as well as successful throughput.

    Checked .

Report an issue. Include the article URL and ID, not passwords or access keys.