Enterprise engineering

How do I load-test an application?

A sound load-test sequence (with k6 or similar, on staging with synthetic data):

  1. Baseline at normal load with clean database and cache telemetry
  2. Ramp to the expected peak and hold it to find saturation and tail latency
  3. Spike to model a campaign or bot burst — overload must be bounded, not catastrophic
  4. Soak for memory leaks, pool exhaustion and queue backlogs
  5. Stress beyond the goal to find the first bottleneck and confirm graceful degradation
  6. Failure injection: Redis unavailable, replica lag, queue worker halted, object-store timeout, CDN cache miss

Watch p50/p95/p99 per journey, error rate, CPU/memory, database pool use and locks, queue lag and cache hit rate. Include expensive searches, upload spikes and bot scraping in the workload mix. Never load-test production without authorisation, and write acceptance criteria (for example "p95 under 400 ms at peak with under 0.1% errors") before you run.

All guides