Scaling Web Servers — latency, throughput, bandwidth, concurrency & parallelism

· updated

Five words that get used interchangeably and aren’t. The simulator gives each one a knob and a live readout so you can watch what happens to the other four when you change one.

The whole scene is a single flow:

clients (req/s) ──→ pipe (bandwidth) ──→ server (N workers, CPU time) ──→ pipe back ──→ clients

Five inputs:

Five outputs (averaged over the last 1 simulated second):

Open fullscreen ↗

The five scenarios on the right-hand side

PresetWhat it sets upWhat you should see
Balanced50 req/s · 25 ms net · 40 ms CPU · 1 Gbps · 4 workersEverything moderate. Baseline to compare the others against.
Low latency5 req/s · 5 ms net · 8 ms CPU · 10 Gbps · 4 workersLatency drops to ~20 ms. Throughput is low (only 5 req/s offered), bandwidth used is near 0 — but each individual request is fast. The “real-time API for a single user” case.
High throughput400 req/s · 25 ms net · 30 ms CPU · 10 Gbps · 16 workersThroughput climbs near 400 req/s. Individual latency is still modest. The “API at peak” case — what cloud auto-scalers chase.
Bandwidth-bottlenecked200 req/s · narrow 50 Mbps pipe · 10 ms CPU · 16 workersWorkers are mostly idle, queue stays empty, but throughput tops out far below 200 req/s. Bandwidth-used pegs near 100 %. The pipe is the limit; adding workers does nothing.
Overloaded250 req/s · 4 workers · 80 ms CPUOffered load (250 × 80 ms = 20 worker-seconds) exceeds capacity (4 workers). Queue grows without bound; latency climbs; throughput plateaus at ≈ 4 / 0.08 ≈ 50 req/s.
Little’s Law100 req/s · 50 ms net · 100 ms CPU · 8 workersSteady state. The formula strip at the bottom shows Concurrency ≈ Throughput × Latency. The error % should stay under 20.

What’s “honest” about it

Controls

Key / buttonAction
spacePause / resume the simulation
rReset all metric buffers
slider in the toolbarTime multiplier (×0.25 – ×3) — slows or speeds up the sim
any preset button on the rightSnap all 5 knobs to a configuration
any of the 5 knobsChange one input in isolation
mouse hover on a metric cardPlain-English definition

← systems