Queueing networks and bottlenecks

On this page

A request may visit caches, application workers and a database, loop back, or fan out to several subrequests. Queueing networks translate external requests into the work each resource must perform.

Solve traffic before waiting

Let be external arrival rate to node , and the probability of routing a completion at to . Stationary flow conservation gives:

These equations are routing accounting; they do not make each node M/M/1. An open Jackson network additionally assumes independent external Poisson arrivals, exponential service, suitable independent memoryless routing, unlimited waiting space and stable node loads. Internal processes must not be casually treated as independent request samples.

The key result is Jackson's stationary product form. For this chapter's single-server nodes:

It makes node occupancies independent at a common stationary time, not successive delays along a path. With feedback, internal node arrivals need not even be Poisson. These marginals still give mean occupancy and hence network mean residence. See the MIT Jackson-network lecture for the distinction and assumptions.

Two-node network with feedbackExternal arrivals λ₀Node 1: μ₁ = 100/sNode 2: μ₂ = 250/sExit with 1−p; return with p

The experiment visits nodes 1 and 2, then returns to node 1 with probability or exits. Each business request visits each node times on average. Both internal rates are . Server rates are 100/s and 250/s; stability requires .

This follows by summing mean node occupancies and using network Little's law; it does not require independent delays along a request's path. At /s and , , each internal rate is 50/s and mean end-to-end time is 31.25 ms.

Preparing the visual
Queueing networks and bottlenecks · Experiment

External Poisson arrivals enter node 1 then node 2. Node 2 returns to 1 with probability p, otherwise exits. Single servers use independent exponential service, μ₁=100/s and μ₂=250/s. Stationary delay is withheld at or beyond the bottleneck.

Increase return probability while keeping external traffic fixed. Internal demand increases. At or beyond the bottleneck, the stationary-condition indicator becomes false and mean delay shows —. A finite plotting window cannot supply a nonexistent stationary solution.

Service demand and bottleneck bounds

Mean service demand at resource per completed business request is . A single-capacity resource has utilization , hence the necessary throughput bound:

includes resource service occupancy, not waiting. Substituting response time mistakes congestion for intrinsic work. For interchangeable parallel resources, the corresponding bound becomes , assuming work can be assigned and no shared bottleneck intervenes. A bottleneck bound is not an achievable-throughput guarantee under an arbitrary latency target.

A closed system with circulating users and mean think time satisfies . Users who submit again only after completion reduce new traffic as responses slow. An open system with externally scheduled arrivals does not self-throttle this way.

Fan-out amplifies tails

If a request waits for all children, its duration includes . Only for IID child times with CDF is the maximum's CDF . If one child finishes before a threshold with probability 0.99, 100 independent children all finish before it with probability only .

Shared databases, networks and failures create dependence, invalidating unconditional multiplication. Serial-stage means add, but adding stage p99 values generally does not produce end-to-end p99. Use joint measurements, appropriate probability bounds or an explicit dependence model.

Check your understanding

  1. A business request visits a database three times, occupying it for 5 ms each. What is the single-resource throughput bound?
Reasoning

s/request, so /s. Waiting targets, other resources and variability may reduce usable throughput further.

  1. Ten users with see mean response grow from 0.1 s to 1 s. What happens in a closed load test?
Reasoning

The stationary relation changes throughput from 100/s to 10/s. The generator slows with the system; this does not show that the system sustained an open demand of 100/s.

Further reading

The CMU performance syllabus covers operational laws, open and closed systems, and networks. Kafka architecture provides a concrete setting for partitions and routing.