Your company is about to spend $50,000 on a launch campaign. Traffic is going to spike the second it goes live. You ran the load test in staging, the Grafana dashboard glowed green—p95: 42ms, p99: 68ms, 0% errors—and everyone signed off.

Ten minutes into the launch, checkout stalls, support tickets explode, and your site melts down under a fraction of the traffic you supposedly just tested.

The post-mortem always blames "unpredictable production traffic." That's rarely the truth. The truth is that most load-testing tools measure a polite fiction, and their default percentile math actively hides tail-latency collapse.

When you run a standard virtual-user (VU) loop in k6, JMeter, wrk, or hey, the tool doesn't just measure your server—it quietly cooperates with your server to make the numbers look good. Here are the five structural ways your load test is lying to you before launch day, and how Lemmings is engineered to expose them.

1. Coordinated Omission: The 100× Tail-Latency Illusion

1

Most load tests default to a closed-loop model: a virtual user sends a request, waits for the response, records the latency, sleeps, and sends the next request.

Now imagine your service handles 200 requests/second at 10ms. Halfway through a 30-second test, a GC pause, database lock, or cold-cache stampede freezes the server for 2 seconds.

  • What happens on launch day: Real visitors do not politely wait for someone else's request to finish before clicking your link. During a 2-second freeze at 200 req/s, 400 requests arrive and stack up in the queue. The first request waits ~2,000ms, the 200th waits ~1,000ms, and the true p99 rockets to ~1,700ms.
  • What your closed-loop load test reports: The instant the server stalls, every VU is blocked waiting on its in-flight request—so the load generator stops sending traffic. It records a tiny handful of slow samples out of thousands of fast ones. Your reported p99 stays at 12–18ms.

Gil Tene named this Coordinated Omission: the load generator coordinates with your stalled server to omit the exact requests that would have proved your architecture was breaking.

How Lemmings Fixes It

Lemmings pairs stateful session simulation with an open-model arrival-rate engine (-rate, -rate-ramp up to 100,000/s using a drift-free Citardauq quadratic schedule). More importantly, it refuses to print a single ambiguous latency number:

  • It tracks every request's intended dispatch time against its actual execution time (QueueDelay).
  • Every report (schema_version: "2.1") and live dashboard panel prints raw service latency right next to coordinated-omission-corrected latency (CorrectedLatency p50/p95/p99).
  • If your local worker pool saturates and sheds load, Lemmings explicitly counts and surfaces RateDropped instead of silently pretending your server sustained the offered rate.

2. The "Fast-Fail" and "200 OK Outage" Illusions

2

Percentiles only measure how fast a server answered—never whether a human got a working page. Two failure modes routinely make naive latency charts look healthier right as your site dies:

  1. Failing fast: Your database connection pool exhausts, and your API starts returning 500 Internal Server Error in 2ms instead of 200 OK in 120ms. Your p95 drops by 90% while your site is completely down.
  2. Soft 200s: A CDN, WAF, or reverse proxy returns HTTP 200 with a blank HTML shell, a "Something went wrong" fallback, a GraphQL {"errors": [...]} payload, or a waiting-room queue page. A status-code-only check marks it green.

How Lemmings Fixes It

Lemmings treats every virtual visitor as a stateful, inspecting session—not a dumb HTTP blaster:

  • Every HTML response is checked for non-empty content, optional DOM selectors, title_contains, contains/not_contains, and want-json dotted-path assertions.
  • At boot, Lemmings indexes your URL surface (sitemap.xml -> robots.txt -> bounded crawl) and computes a SHA-512 baseline checksum per page, flagging unexpected body drift (-strict-checksum to fail on drift).
  • When a lemming hits a waiting room, it detects its queue position, polls on interval, and reports queue depth, wait-time percentiles, and how many visitors died in line without ever being admitted.

3. Connection Pinning and Load-Balancer Skew

3

One of the quietest launch-day killers is HTTP/2 multiplexing and keep-alive reuse in staging.

When a load generator opens 50 persistent HTTP/2 connections from a single machine to an L4 load balancer (like an AWS NLB), those 50 TCP connections get pinned to a tiny subset of warm backend pods while the rest of your fleet sits idle. Worse, if a single misconfigured pod starts throwing errors or running hot, your aggregate p95 averages it out across 12 healthy nodes.

How Lemmings Fixes It

Lemmings builds L4/L7 load-balancer diagnostics directly into the core runner:

  • Explicit connection modes (-conn-mode): Switch between reuse (HTTP/2 + keep-alive), http1 (HTTP/1.1 + keep-alive), and fresh (a brand-new TCP + TLS handshake per request) to expose L4 connection pinning and TLS handshake saturation before launch.
  • Automatic backend attribution (-lb-header): Inspects HTTP headers, WebSocket 101 upgrade headers, gRPC response headers/trailers (X-Served-By, Fly-Machine-ID, X-Upstream, etc.), or TCP peer addresses.
  • Jain’s Fairness Index & Max Skew %: Computes exact per-backend hit share, failure rate, and latency percentiles, emitting an unambiguous balanced, skewed, pinned, or single verdict in every report.

4. Guessing VUs Instead of Finding the Capacity Knee

4

Most teams pick an arbitrary VU count ("let's run 500 VUs for 5 minutes"), see a green p95, and ship. That tells you nothing about how close you are to the cliff.

By queuing theory, tail latency scales roughly as $1 / (1 - \rho)$, where $\rho$ is utilization. A service at 75% utilization looks calm; at 92% utilization, the exact same service enters unbounded queue growth. A fixed-VU test never tells you where the knee of the curve actually sits.

How Lemmings Fixes It

Instead of making you guess VU counts and eyeball charts, Lemmings ships an automated three-phase capacity discovery engine (lemmings capacity -terrain T):

  1. Phase 1 (Exponential Doubling): Doubles concurrency from -capacity-start up to -capacity-max until an SLO gate trips (-p95-budget, -max-failure-rate, or -min-plan-pass-rate).
  2. Phase 2 (Binary Search): Narrows the exact concurrency ceiling down to -capacity-precision.
  3. Phase 3 (Confirmation): Re-runs the discovered ceiling (-capacity-confirm) to prove it is sustainable, not a lucky burst.

Pair it with lemmings compare -max-capacity-drop <N> and your CI pipeline gates on actual confirmed capacity—not a vanity percentile from an under-loaded run.

5. Averaging Percentiles Across Time Windows and Nodes

5

The fastest way to hallucinate a healthy p99 is to average per-minute p99 values or average p99 across distributed worker nodes. Percentiles are not additive or averageable. Averaging five p99 numbers from five workers produces a mathematically meaningless scalar that systematically hides the real tail.

How Lemmings Fixes It

Lemmings preserves full latency distributions instead of collapsing them prematurely, pairs every run with 36 cardinality-bounded Prometheus metrics, and enforces raw vs. corrected reporting across JSON, Markdown, and offline Synthwave HTML reports.

Stop Shipping Confirmation Bias

A load test's job is not to produce a reassuring green screenshot for a launch review. Its job is to break your assumptions before your users do.

If your tool hides server stalls behind closed-loop VUs, ignores soft-200 failures, masks L4 connection pinning, and locks distributed runs behind per-VUh cloud billing, you aren't load testing—you're paying for a false sense of security.

Clone github.com/andreimerlescu/lemmings, run make demo && make run, and watch what your system actually does when traffic stops being polite.

GitHub logo andreimerlescu / lemmings

Lemmings is a Go utility that simulates NPC traffic for real world scenario testing.

L E M M I N G S

Stateful multi-protocol load simulation (HTTP, gRPC, MCP, JSON-RPC 2.0, WebSockets, SSE), open-model arrival-rate pacing, automated host capacity benchmarking, strict TLS/mTLS compliance, load-balancer diagnostics, live error screenshots, and CI regression gates — in one zero-Node Go binary.

Go Version Release License

How Lemmings Works

Most load testers blast stateless HTTP requests and hand you a table of status codes. Lemmings acts like a real crowd of stateful clients — and hands you the receipts, the exact concurrency ceiling, the TLS posture, and the replica skew from one static binary.

Lemmings v2.1 End-to-End Architecture Overview: YAML plans, load models, and 0600 TLS/auth configs flow into a stateful 6-protocol swarm engine with load-balancer diagnostics and non-blocking Chrome CDP forensics, outputting a live Admin Portal, self-contained reports, CI gates, and 36 Prometheus metrics

  • 6 Native Protocols: HTTP/HTTPS, gRPC (dynamicpb + Server Reflection v1/v1alpha, zero protoc), MCP (2025-06-18) (Streamable HTTP, Legacy HTTP+SSE, stdio), JSON-RPC 2.0, WebSockets, and SSE.
  • Strict TLS 1.2/1.3 & mTLS: Modern AEAD/PFS-only ciphers, -tls-min-version 1.3, mutual TLS, mode-0600 secret files, <30d cert-expiry alerts, and zero -tls-insecure bypass flag.
  • …