· Engineering notes
How to scope a SaaS load test before you write k6
Fill the inputs, pick the traffic model that does not lie for your API, and define what "fail first" means ? then script. This hub ties our k6 notes and Lab tools into one pass/fail workflow.

Stop if you cannot answer these four inputs
Before you open k6, write one line for each:
- Peak demand ? peak requests/sec or peak concurrent sessions for the critical API path you care about (from prod metrics, not a guess).
- SLO ? p95 (or p99) latency and error budget for that path.
- Critical path ? the 1?3 HTTP flows that lose money or trust if they fail (login ? create ? pay is a common chain).
- Data rules ? unique users, tenant isolation, and whether the test may write to a shared staging DB.
If (1) or (2) is missing, fix observability first. A green load test against an unknown SLO is theatre.
Artifact: SaaS load-test scoping checklist
## Load scope ? fill before scripting
Critical path:
Peak RPS / concurrent sessions:
p95 SLO (ms) / max error rate:
Environment (staging size vs prod %):
Write traffic allowed? (Y/N) + cleanup plan:
Auth model (token farm / login VU):
Success checks (status + business assertion):
Abort rules (when to stop the run):
Owner + date:
Decision table: closed VU vs arrival-rate
| Use | Closed model (VUs wait on responses) | Arrival-rate / open model |
|---|---|---|
| Traffic looks like | A fixed pool of users clicking when free | Independent arrivals (checkout spikes, webhooks, API clients) |
| Lies when | Latency rises: throughput collapses and you under-report queueing | You forget think time / correlation and stampede a login endpoint |
| Prefer when | Human UI sessions with natural pacing | API backends, partner traffic, marketing spikes |
| k6 starting point | constant-vus / ramping-vus | constant-arrival-rate / ramping-arrival-rate |
Deep dive on coordinated omission and arrival-rate: realistic load tests with k6. Tool choice: JMeter vs k6.
?What fails first? checklist
Rank these before you chase p95 on a single happy-path GET:
- Connection pools (app ? DB / Redis) exhausted
- Auth/token endpoint saturates and poisons every scenario
- Queue consumers lag while HTTP still returns 200
- Row locks / unique constraints under write load
- Autoscaling cool-down: cold pods during spike
- Rate limits / WAF trip on synthetic IP ranges
Your report should say what broke first, not only ?p95 was 812 ms?.
Pass/fail thresholds you can paste
Official docs: k6 thresholds, executors. Example only ? replace numbers with your SLO:
export const options = {
thresholds: {
http_req_failed: ['rate<0.01'],
http_req_duration: ['p(95)<500'],
checks: ['rate>0.99'],
},
};
How to read the output without vanity graphs: reading performance test results.
Lab path (free tools on this site)
- Capacity calculator ? turn concurrent users + think time into rough RPS.
- SLO & error budget calculator ? know what 99.9% allows before you set thresholds.
- k6 script generator ? first script from OpenAPI or curl.
- Load test results analyzer ? turn k6/JMeter exports into a short summary.
When to involve Assertwise
If you need a scoped load engagement (workload model, scripts in your repo, capacity statement, re-test after fixes), see load & stress testing or book a free 20-min test audit ? leave with the three highest-risk load scenarios for your stack.
Before scoping traffic: SLO and error budget before load.
Pool saturation pattern: connection pool exhaustion k6 check.