Lesson 12 of 13 · 12m
Your Load Test Coordinates Its Own Omission
Closed generators censor the stall you're trying to measure; open-model arrival rates and HdrHistogram tell the truth.
Your load test's p99 is a fiction, and the mechanism is called coordinated omission. Gil Tene named it in "How NOT to Measure Latency," and once you see it you can't unsee it: a closed-model load generator — wrk, default JMeter, anything with a fixed thread count — schedules the next request only when the previous one returns. During a stall, the generator waits politely. When the stall ends it resumes at full speed, and the stall window contributes zero samples to the histogram. The outage gets measured as nothing.
The arithmetic of the lie
Run a 10,000 rps test against a service that stalls for one second. In reality, ~10,000 requests backed up and arrived late — each should land in the histogram at 1+ seconds of response time. The closed generator never sends them; its workers were blocked on the stalled requests. When it resumes, response times snap back to normal, so the recorded p99 shows a blip instead of a wall. You measured a system under load that coordinates its measurement with the system's health — hence "coordinated" omission. The reported max is fiction too: the worst measured latency is bounded by where the generator happened to be blocked, not where users waited.
The right quantities are service time — how long the server takes to process a request once it starts — and response time — service time plus every millisecond spent queued. Closed models measure a censored response time; what production users feel is the uncensored one.
Open models drive from a clock
An open-model generator schedules requests by arrival rate: at t=0.0001 s send request one, at t=0.0002 s send request two, regardless of what's still outstanding. If the server stalls, requests pile up and get counted — the histogram accumulates the queued truth. wrk2 is Tene's own fork of wrk built for exactly this: constant throughput plus coordinated-omission-corrected latency reporting — it logs both the raw numbers and the corrected ones, so the censorship is visible rather than hidden. k6 does it with arrival-rate executors (constant-arrival-rate, ramping-arrival-rate); Gatling's open-injection model is the same idea. HdrHistogram is the storage format all of this assumes — it records latencies across orders of magnitude at fixed significant-digit precision, so the 1 s stall and the 200 µs success live in the same honest histogram.
What changes when you fix the model
The stall stops hiding. Percentiles above p99 become informative instead of censored — under a closed model, "p99.9" is the 99.9th percentile of what the generator managed to send. The max regains meaning as the worst observed response, and you can finally answer "what did the worst user experience look like" — the question an SLO is secretly asking.
This also reframes what a load test is for. A closed model benchmarks offered capacity; an open model measures admitted behavior under real arrival patterns. Production arrivals don't check whether the previous request finished. They arrive on a schedule indifferent to your health — which is the entire point of measuring.
Practice
- Test with an open model at fixed arrival rates;
wrk2, k6 arrival-rate executors, or Gatling open injection. - Record raw HdrHistograms; report max alongside percentiles, and treat a missing max as a censored test.
- Run the stall on purpose: trigger GC, kill a replica mid-test, and confirm the histogram shows it. A load test that can't see a stall can't see anything.
- Separate service-time and response-time charts; their divergence is your queue depth.
If your benchmark's worst case is bounded by your harness's patience, you benchmarked the harness.
Was this lesson helpful?
Keep reading
Related articles from the SudoSecurity blog.
Your Container Is Running SerialGC and Nobody Told You
You tuned G1 flags for a week. Your pod has one CPU, which means the JVM quietly picked a single-threaded collector at startup and ignored every flag you set. Here is the OpenJDK source that made that decision.
PostgreSQL 19 Is Out. REPACK Kept My Writes Running. The Docker Upgrade Will Stop Your App.
PostgreSQL 19 shipped on November 19 with REPACK (CONCURRENTLY), which removes table bloat without blocking writes. I measured it against VACUUM FULL, ran the upgrade from 18, and checked what breaks for self-hosters: Docker tags that refuse to start, a config setting that stops the server, and...
AWS Emulator Puts AWS on Your Laptop. Keep Your IAM Tests Off It.
AWS released AWS Emulator on November 11, a free local server that answers AWS API calls on 127.0.0.1 with per-run keys and fresh certificates.
Your npm Install Just Ran Someone Else's Code: Why Dependency Security Has to Start Before CI
A pull request checkout, a poisoned GitHub Actions cache, and an OIDC token pulled straight out of runner memory. That's how 84 malicious versions of TanStack's packages hit npm in six minutes.