Skip to content
Queueing network templates

Queueing Network — Checkout API Call Chain

An 850-request-a-second checkout path across six services, where the payment adapter's bounded connection pool is the constraint and heavy-tailed pricing latency (cv 1.9) more than doubles the queue an M/M/c model would predict.

Template previewQueueing network
Checkout API — request path at peakOpen queueing network · 6 stations · 9 routes · arrivals 850/s · target ρ 75%10.9710.620.940.06 back850/sarrivalsexit 0.03exit 0.381exitGateway×8λ 850/s · ρ 63.8%Wq 0.4ms · Lq 0.32W 6.4ms · L 5.42M/M/8 · P(wait) 18.2%Auth service×11λ 850/s · ρ 69.5%Wq 0.9ms · Lq 0.79W 9.9ms · L 8.44G/G/11 · P(wait) 19.5%Cart service×16λ 825/s · ρ 72.1%Wq 0.5ms · Lq 0.41W 14.5ms · L 11.95M/M/16 · P(wait) 15.9%Pricing engine×26λ 856/s · ρ 72.5%Wq 0.6ms · Lq 0.5W 22.6ms · L 19.34G/G/26 · P(wait) 8.3%Payment adapterbottleneck×80λ 531/s · ρ 79.6%Wq 0.2ms · Lq 0.12W 0.12s · L 63.84M/M/80/240 · blocked 0%Order writer×12λ 499/s · ρ 74.9%Wq 1.6ms · Lq 0.78W 19.6ms · L 9.77M/M/12 · P(wait) 26.4%StationModelcK1/μλλ effaρP(wait)P(block)LqWqLWGatewayM/M/88∞6ms850/s850/s5.163.8%18.2%0%0.320.4ms5.426.4msAuth serviceG/G/1111∞9ms850/s850/s7.6569.5%19.5%0%0.790.9ms8.449.9msCart serviceM/M/1616∞14ms825/s825/s11.5472.1%15.9%0%0.410.5ms11.9514.5msPricing engineG/G/2626∞22ms856/s856/s18.8472.5%8.3%0%0.50.6ms19.3422.6msPayment adapterM/M/80/240802400.12s531/s531/s63.7179.6%3.2%0%0.120.2ms63.840.12sOrder writerM/M/1212∞18ms499/s499/s8.9874.9%26.4%0%0.781.6ms9.7719.6msBottleneck: Payment adapter at ρ = 79.6% on 80 servers — 85 servers (5 more) would bring it under the 75% target.Offered 850/s · throughput 850/s · L 118.76 in system · W 0.14s end to end · 6 stationsStable — every station holds ρ below 1. Network response time is Little's law on the solved flows: W = L / throughput.

Make it your own.

title "Checkout API — request path at peak"
target 75%
rate unit /s
arrivals Gateway 850/s

station Gateway            { servers: 8;  service: 6ms }
station "Auth service"     { servers: 11; service: 9ms;  cv: 1.6 }
station "Cart service"     { servers: 16; service: 14ms }
# Pricing latency is heavy-tailed: promo evaluation dominates the tail.
station "Pricing engine"   { servers: 26; service: 22ms; cv: 1.9 }
# The connection pool is a hard limit — requests beyond it are shed, so the
# adapter is M/M/c/K rather than an unbounded queue.
station "Payment adapter"  { servers: 80; service: 120ms; capacity: 240 }
station "Order writer"     { servers: 12; service: 18ms }

route Gateway -> "Auth service" 1.0
route "Auth service" -> "Cart service" 0.97
route "Auth service" -> exit 0.03            # rejected tokens
route "Cart service" -> "Pricing engine" 1.0
route "Pricing engine" -> "Payment adapter" 0.62
route "Pricing engine" -> exit 0.38          # quote-only traffic
route "Payment adapter" -> "Order writer" 0.94
route "Payment adapter" -> "Pricing engine" 0.06   # re-price after a decline
route "Order writer" -> exit 1.0