1. LandOffer
  2. Blog
  3. All articles
  4. Plan a Load Test Around Real Traffic Patterns and a Stopping Rule

Engineering Practice

Plan a Load Test Around Real Traffic Patterns and a Stopping Rule

Define workload evidence, arrival rate, request mix and stop authority before applying load. Review a complete bounded local HTTP plan and its actual stopped-run report, with clear limits on capacity and production inference.

10 min readLandOffer team

Plan a load test by defining the arrival pattern, request mix, data and environment before increasing traffic. State what evidence would stop new load, who can stop it and how already-issued work will be handled. Record scheduled arrivals, actual starts and completed throughput separately. If the generator silently sends less work when the system slows, the result may hide the pressure you intended to study.

This LandOffer.ai guide develops an original test plan and an actual bounded loopback HTTP exercise. We sent 72 requests to a purpose-built local test double and retained every observation. The business workload and owners are fictional. No external service, customer data, production system, cloud account or k6 installation was tested; the measured boundary belongs only to this deliberately constrained fixture.

One adult brings a tray of clay pieces to two seated ceramic artisans while another reads an open notebook.

Match the load model to the question

Start with the question: can the intended service handle its ordinary traffic, a short surge, long operation or increasing pressure? Those are different experiments. Grafana's k6 test-type guidance distinguishes smoke, average-load, stress, soak, spike and breakpoint tests. It recommends starting small and choosing patterns from the system's risks rather than treating one test as comprehensive.

For a real service, use approved observations to establish relevant request classes, arrival rates, peaks, session behavior, payload sizes and data distribution. Record the source period and exclusions. An average over an entire day can conceal a short synchronized burst. A small cache-friendly record set can also produce a very different workload from varied searches or large result sets.

Where evidence is missing, label the workload an assumption. The fictional planning team below assumes a read-only mix of lookup, detail and search requests. It does not claim to have inspected real logs or established representative customer behavior. Those assumptions define a teaching exercise, not a service-capacity target.

An iteration is not necessarily one HTTP request. A user journey may issue several requests and pause between actions. If the business question concerns independent arrivals, document how iterations become requests and how think time affects concurrent work. Do not relabel a request rate as a user count.

Separate arrival rate, concurrency and completion

Grafana's open-versus-closed model guidance explains that closed-model iterations wait for prior work to finish, while arrival-rate models start work independently of completion. Slower responses can therefore reduce the offered rate in a closed model. Which model is appropriate depends on the behavior being simulated.

Our original local scheduler targets new request starts at fixed intervals independently of response completion. It uses a bounded pool of client threads, so a saturated generator could still fall behind. The retained record includes scheduled and actual start times; a target rate alone is not proof that the generator delivered it. For n starts, inspect the n−1 actual start intervals alongside schedule delay and any unstarted work; do not infer arrival rate from successful responses alone.

Concurrency is a separate observation. Ten requests per second with short responses can require fewer simultaneous operations than ten per second with long responses. A server's worker count is not the number of users it supports. Likewise, successful responses per second exclude rejected work, even though those rejected attempts still matter to the service's user-facing result.

The test double has exactly two admission slots. An admitted request sleeps for 50 milliseconds and returns JSON; a request arriving when both slots are occupied returns 503. That artificial rule creates an inspectable bottleneck. It contains no database, dependency calls, authentication or realistic business processing.

Worked asset: a complete workload and stopping plan

Fictional test owner Celia, service owner Anwar and evidence reviewer Teo agree on this packet before the exercise. All limits are deliberately small local choices, not production recommendations. The fixture is the only authorized target.

Plan item Completed agreement
Objective Observe offered-load scheduling and rejection at a known two-slot admission boundary; do not estimate real application capacity
Target and isolation Original Python HTTP fixture bound only to 127.0.0.1 on an ephemeral port; no external hostname or production route
Requests and data GET /lookup, /detail and /search; fixed synthetic JSON, no writes, personal records or downstream service
Intended mix Repeating ten-request pattern: six lookup, three detail, one search. Each iteration sends exactly one request; no login or human session is represented
Planned curve 10 starts/s for one second, then 20/s for two seconds, 40/s for two seconds and 80/s for two seconds, advancing only if no stop has occurred
Generator bounds At most 16 client threads, 300 scheduled requests and eight seconds of scheduling; two-second timeout per request
Error stop Once a stage has at least twenty completed attempts, stop scheduling if its most recent twenty by request-start order contain at least two non-200 responses
Other stop and hold conditions Hard request/time caps stop scheduling. Target mismatch, missing observations or invalid response content require investigation, not an assumed capacity pass
Stop owner and cleanup Celia can stop the generator; allow already-issued requests to finish within the timeout, then shut down the local server
Evidence Runtime, fixture source, schedule, per-attempt route/status/start/duration, stage counts, nearest-rank p95 and stop reason
Decision boundary Teo reviews the bounded local findings. Anwar must approve a new environment-specific plan before any actual service experiment

This is a short exercise of the mechanism, not a realistic soak or production breakpoint study. It verifies the local script and the stated stop path at small scale. A real workload plan would additionally need representative data, environment topology, dependency capacity, authorized monitoring and an operator who can respond to effects outside the generator.

The stop rule is checked by the scheduler, not continuously by an omniscient controller. A response may arrive between checks, and some requests will already be in flight. Stopping new submissions is therefore different from instantly terminating every operation or proving recovery. The final counts include work that finished after the decision to stop scheduling.

Inspect the curve that actually ran

The isolated Python 3.12.14 run completed the 10/s and 20/s stages, then stopped during the 40/s stage. The proposed 80/s stage never ran. These are actual measurements of the authored local HTTP fixture; they are not results from k6 or a real service.

Stage target and duration Planned / started attempts HTTP 200 / failed Actual start span p95 request duration
10/s for 1 second 10 / 10 10 / 0 0.9067 seconds 62.25 ms
20/s for 2 seconds 40 / 40 40 / 0 1.9521 seconds 60.79 ms
40/s for 2 seconds 80 / 22 15 / 7 0.5263 seconds 61.41 ms
80/s for 2 seconds 160 / 0 Not run Not run Not measured

The start span measures first actual request start to last actual start, not the full planned stage duration. There are nine intervals between ten starts and 39 between forty starts. Retain that definition when checking achieved start rates; dividing the request count by the start span would use the wrong interval count.

Request duration is measured from the client's HTTP call to reading its response. The p95 uses nearest rank over all completed attempts, including quick 503 rejections. It excludes time waiting in the client executor before the HTTP call. None of these percentiles represents a browser journey or a production user's end-to-end response time.

This distinction explains why the 40/s p95 remains near 61 milliseconds despite seven failures. Rejecting an operation quickly can look good in a latency summary while failing the workload. Review latency alongside successful completion. Here, the fast failures explain why a modest p95 cannot justify continuing past the error-stop condition.

Worked asset: a filled bottleneck and boundary report

Teo records the observed workload: 72 requests started and completed, comprising 50 successful responses in the first two stages and fifteen in the partial third stage. The remaining seven responses are 503 rejections. Total HTTP 200 responses are therefore 65, not 72. No 80/s observation exists.

The completed route counts are six/three/one in the 10/s stage, 24/12/four in the 20/s stage and fourteen/six/two in the stopped 40/s stage. Those totals sum to 44 lookup, 21 detail and seven search attempts. The partial final pattern explains why the overall proportions are not exactly 60/30/10; the harness does not invent extra requests to restore the planned mix.

The report's bottleneck statement is deliberately narrow: “The fixture implements two admission slots and a 50 ms delay for admitted requests. At the 40/s target, this run produced seven admission rejections among 22 attempted requests and activated the configured stop. That is the designed fixture boundary being exercised, not a diagnosis of a production CPU, database or downstream bottleneck.”

Two slots divided by 0.05 seconds suggest an idealized 40 admitted operations per second before overhead. That arithmetic is not a measured sustainable limit. Network, interpreter scheduling, request handling and timing alignment affect this small local run. That idealized calculation does not establish a sustainable operating point or turn the incomplete 40/s stage into a successful capacity demonstration.

Celia's completed stop note reads: “No further new requests or later stages. Drain issued requests within their timeout and close the fixture server. Preserve all observations, including rejected requests. Do not rerun with a looser error rule to make this run pass.” The retained result records the server as closed after cleanup. A companion PDF/SVG curve and complete CSV were generated from the saved 72-attempt record, not from another test. The plot retains the quick rejected requests separately from successful responses.

Anwar's decision is to keep real-service capacity unknown. The 20/s stage completed forty requests without errors over this brief exercise, but that does not establish long-duration reliability or a production operating point. Any follow-up requires a new plan with the intended service's data, dependencies, limits and monitoring; no larger test is authorized by this report.

One adult holds a wooden bar across a ceramics work counter beside an empty tray while another reads a notebook.

Make the stopping mechanism part of the evidence

Grafana's threshold documentation distinguishes end-of-test pass/fail criteria from optional abort behavior. Its configuration includes abort-on-failure and delayed evaluation. The documented cloud mode may evaluate abort conditions on an interval, so an immediate-stop assumption needs checking against the actual runner.

The local harness here uses its own simple scheduler rule. It is not a k6 threshold expression, and it does not establish how another runner stops. Before an actual test, verify both the signal and the mechanism: who receives it, whether new arrivals stop, which work drains and which dependencies may remain active.

Missing target traffic can also invalidate a conclusion. If the generator cannot supply the intended arrivals, a quiet server does not prove spare capacity. Preserve dropped or delayed starts, generator resource evidence and response counts. Do not discard failed attempts from the denominator because successful responses are the more convenient series to graph.

Carry the limitations into the next decision

Real traffic can include correlated bursts, cache misses, large payloads, varied tenants and dependent journeys. This fixture has none of those properties. All three paths use the same artificial admission rule and delay, so their names do not establish three distinct database workloads. The short result gives no evidence about memory leaks, autoscaling, connection reuse under real clients or resilience after a long overload.

For your next plan, bring the permitted workload evidence, arrival model, data distribution, isolation boundary and stop record together. More engineering guides are available from LandOffer.ai. Report which stages actually ran, preserve the stopped stage and ask the actual service owner to approve any next workload and environment. Do not extend this fixture result to production. A stopped, well-bounded test is useful when it prevents an unsupported capacity claim and defines the evidence needed next.

Sources and Further Reading

  • Grafana k6: Load test types — current documentation showing v2.3.x latest checked October 27, 2026; no k6 installation or run claimed.
  • Grafana k6: Open and closed models — current primary scheduling discussion checked October 27, 2026; exact page publication date not displayed.
  • Grafana k6: Thresholds — current primary pass/fail and abort discussion checked October 27, 2026; exact page publication date not displayed. The executed local scheduler is original Python code.