Scaling Web Servers — latency · throughput · bandwidth · concurrency · parallelism stress 60 fps

running
tick ×0.5 Hover anything for an explanation. Presets sit below the knobs.
Knobs · adjust the inputs

Inject a DB event: a row lock serialises writes; a blocking CREATE INDEX stalls writes for 9 s; CONCURRENTLY builds without blocking but slows every query.

formulas · assumptions
Little's law: concurrency = throughput × latency
CPU ceiling = servers × workers / CPU time
pipe capacity = bandwidth × one-way delay (bytes in flight, both directions)
RTT floor = 2 × one-way delay
Request 4 KB, response 16 KB, 503 body 512 B. Host RAM = 80 MB + 220 MB per worker + 8 MB per busy thread, capped at 4 GB. DB RAM = 400 MB + 11 MB per connection + 4 MB per queued query. 45 % of queries are writes; DB time is jittered 0.35–2.05× the mean. One thread per worker holds the GVL at a time; a thread at the DB releases it.
Flow visualizer N requests in flight
← swipe the scene sideways to pan →
latency —ms RTT for one request
throughput —req/s completed / second
bandwidth —% used — of 250 Mbps
concurrency — in-flight requests
parallelism — / — workers busy
CPU —% mean across servers
RAM —MB / 4096 MB cap
503s — rejected requests
Little's Law: Concurrency = Throughput × Latency — ≈ — × —