Launch day is the worst time to learn how many users your API can serve. A load test a week earlier answers that question while there is still time to act on the answer. This guide walks through a test you can run in an afternoon.

1. Decide what "ready" means

Write down three numbers before you send a single request:

  • Expected peak traffic. If you expect 2,000 visitors in the launch hour and each makes about 30 API calls, that is roughly 17 requests per second on average, with peaks two to three times higher. Plan for 50 requests per second.
  • Acceptable latency. For example: 95% of requests answer within 500 ms (the p95).
  • Acceptable errors. For example: fewer than 1% of requests fail.

These become your pass/fail thresholds. Without them, a load test produces charts but no decision.

2. Test a journey, not an endpoint

Real users do not call GET /health in a loop. They sign in, list things, open one, and change something. Model that path, with realistic pauses between steps:

  1. POST /login and keep the token it returns.
  2. GET /products?page=1
  3. GET /products/{id} for an id taken from the list.
  4. POST /cart with that product.

Pass values from one step to the next (the token, the id) so each virtual user behaves like a person, and use a dataset of test accounts so you do not hammer one user's rows.

3. Ramp up, hold, ramp down

Start small and increase the load in stages:

Stage Duration Arrival rate
Warm up 1 min 5 per second
Ramp 3 min 5 → 50 per second
Hold 5 min 50 per second

The ramp shows you where latency starts to bend; the hold shows whether the system stays stable or slowly degrades (connection pools filling up, memory growing, queues backing up).

4. Run it against a copy of production

Test a staging environment that matches production in size and configuration. If you must test production, do it at a quiet hour, tell your hosting provider when they ask for notice, and keep the first runs small.

5. Read the result in the right order

  1. Errors first. A fast 500 is still a failure. Group errors by status code and step.
  2. Then percentiles. Look at p95 and p99, not the average (see why averages hide slow requests).
  3. Then the curve. Find the arrival rate where p95 starts climbing faster than the load: that is your practical capacity.

6. Fix the biggest thing, then run it again

Most first tests find one dominant bottleneck: a missing database index, an N+1 query, a connection pool that is too small, or an external API without a timeout. Fix that one thing and run the same test again, then compare the two runs side by side. Repeat until the thresholds pass with headroom.

Doing this with Hoofbeat

Describe the journey in plain words in HoofbeatChat ("log in, list products, open one, add it to the cart, 50 users per second for 5 minutes") or build it step by step in the visual builder. Hoofbeat runs a small smoke test first so you do not load a broken flow, applies your thresholds, and keeps every run so you can compare before and after.