What is API load testing?
Load testing sends controlled volumes of concurrent traffic at your API and measures how response time, throughput and error rate behave as pressure rises. Functional tests prove your API is correct; load tests prove it stays correct — and fast — when 500 users arrive at once.
The four performance test types
| Type | Traffic pattern | Question answered |
|---|---|---|
| Load test | Sustained expected traffic (e.g. 100 RPS for 10 min) | Does normal production traffic hit our latency targets? |
| Stress test | Ramp up until failure | Where is the breaking point, and how does it fail? |
| Spike test | Instant jump (e.g. 10× in seconds) | Do we survive a launch, a sale, a viral moment? |
| Endurance (soak) | Moderate traffic for hours | Do leaks, connection exhaustion or drift appear over time? |
The metrics that actually matter
- p95 / p99 latency — the experience of your slowest 5% and 1% of requests. Averages hide disasters: an average of 80ms can coexist with a p99 of 4 seconds.
- Error rate under load — 0.5% errors at 200 RPS is a thousand failures an hour.
- Throughput ceiling — the RPS where latency starts climbing nonlinearly; capacity planning starts here.
- Recovery time — after a spike ends, how long until latency returns to baseline?
How to run your first API load test
- Pick one endpoint that matters — usually login or your most-hit read.
- Establish the baseline: single-user latency. If it's slow with one user, load testing will only confirm the obvious.
- Model realistic traffic: expected concurrent users and request mix, not a random big number.
- Run load → stress → spike in that order, against a production-like environment (never a shared prod DB without a plan).
- Set budgets: e.g. p95 < 200ms, error rate < 0.1%. A test without pass criteria is a demo, not a test.
- Re-run on every significant release — performance regresses in silence.
Common mistakes
- Testing averages. Percentiles or nothing.
- Ignoring warm-up. Cold caches and JIT make the first minute unrepresentative.
- One giant burst, no ramp. You learn the ceiling but not the curve.
- Testing localhost. Network, TLS and load balancers are part of the answer.
- No error-rate assertion. Fast 500s look great on a latency chart.
Load testing with Flasqo
Flasqo's performance module runs load, stress, spike and endurance profiles from the browser with live latency/throughput charts — no JMeter scripts or infrastructure. Set the profile, watch p95/p99 in real time, export the report, and gate deploys on the result with the Production Gate. It's free: start a load test now, or see chaos testing for what to break next.