performance-testing
Performance Testing
Answer three questions with numbers: Is it fast enough? How much can it take? What breaks first? Test against a production-like staging environment; never load-test production or third-party systems without explicit authorization and a scoped plan.
Pick the test type (do not conflate them)
| Type | Load shape | Finds |
|---|---|---|
| Baseline/load | Expected peak, sustained 15–60 min | Does the SLO hold at normal peak? |
| Stress / breakpoint | Ramp past peak until it degrades | Ceiling and failure mode (graceful 429/503 vs cascading failure) |
| Spike | Sudden 5–10× burst | Autoscaling lag, queue and cache behavior, recovery |
| Soak / endurance | 60–80% load for 4–24 h | Leaks, pool exhaustion, log/disk growth (memory-leak-resource-testing) |
| Scalability | Step resources 1×, 2×, 4× | Linear scaling or diminishing returns (scalability-capacity-testing) |
| Front-end/page-load | Real browser, throttled CPU/network | Core Web Vitals (web-performance-testing) |
Set targets first
Agree SLOs before running: p95/p99 latency, error rate, throughput, resource ceilings (CPU < 70%). Without a target a number is just trivia. Compare with a baseline (last release); a 200 ms → 400 ms regression matters even if 400 ms "sounds fine".
Model realistic load
Use production analytics for request mix, think time, session length and data distribution. Public traffic is an open model (arrival rate); internal tools are a closed model (fixed users). Little's Law: concurrency = arrival rate × latency. Seed realistic data volumes and vary parameters so caches do not make everything look fast.