Performance and load testing

Users and requests per second

There are two ways to make load — a number of simulated users, or a fixed number of requests per second — and they answer different questions. Plus think time, ramp-up, and why a few users can mean thousands of requests.

"Run it with 100 users" sounds clear, but it hides a choice that changes the result completely. A load tool can make load in two ways.

Way 1: simulated users (a closed model)

Each simulated user (also called a virtual user, VU) does what a person would: send a request, wait for the answer, maybe pause, send the next one — over and over.

user 1:  [request ──── answer] pause [request ──── answer] pause …
user 2:     [request ──── answer] pause [request ──── answer] …

The number of users stays fixed. The number of requests depends on how fast the API answers: if an answer takes 100 ms, one user with no pause sends about 10 requests a second; if the API slows to 1 s per answer, the same user sends 1.

That is both the strength and the trap:

  • Strength: it behaves like a fixed group of people — "what do 50 people at once experience?"
  • Trap: when the API slows down, the test automatically sends less. A struggling API gets a gentler test, exactly when you wanted to know how it copes. The report can look calmer than reality.

Think time

Real people pause between requests — they read the page, type, decide. A pause between a simulated user's requests is think time. With no think time, a user fires its next request the instant the last answer arrives — far harder than any person:

UsersAnswer takesThink timeRequests per second
5050 msnoneabout 1,000
5050 ms1 sabout 48
5050 ms5 sabout 10

The same "50 users" is 1,000 requests per second or 10 — depending only on think time. That's why "50 users" on its own isn't a meaningful number; say the think time too. Adding a little random extra think time stops all users acting in lockstep.

The rule of thumb: requests per second ≈ users ÷ (response time + think time), with times in seconds.

Way 2: requests per second (an open model)

Here you set the arrival rate — "200 requests every second" — and the tool keeps that rate whatever the API does, starting more users if answers slow down (up to a limit you set).

every second: 200 requests start — whether or not earlier ones have finished

This is how the real internet behaves: new customers don't wait for earlier customers' pages to finish loading before they arrive. If the API slows, requests pile up — just like in real life — and the test shows it.

  • Use it to find capacity: "can it handle 300 a second?" — the honest answer, because the load doesn't back off.
  • If the API is so slow that the tool runs out of users to start requests with, those requests are not sent — and a good report counts them. "Requests not sent" is a sign that the API (or the computer running the test) couldn't keep up.

Which to use

QuestionUse
"What do 50 people at once experience?"Users, with realistic think time
"Can it handle the sale's 300 orders a second?"Requests per second
"Where does it break?"Requests per second, rising step by step
"Does a slow dependency make it fall over?"Requests per second — users would back off

When in doubt about capacity, use requests per second.

Ramp-up: don't start at full speed

Starting 500 users in the same instant is a spike test whether you meant it or not — and it hits cold caches and pools that haven't warmed up yet. A ramp-up adds users (or raises the rate) gradually: up to 200 users over 2 minutes, hold for 10, down over 1. You also learn more: watching the response time as load rises shows where it starts to bend.

Where the load comes from

The tool's computer does real work: every request is a connection, encryption, a body to read. A laptop can produce a few thousand simple requests per second; beyond that, the laptop becomes the bottleneck — and the numbers describe it, not the API. Signs: the tool's computer at 100% CPU, requests not sent, response times that rise for every request at once. For big tests, run the load from a powerful machine close to the API, or from several machines.

Your network matters too: from home over a VPN, every response time includes the trip there and back.

Key takeaways

  • Simulated users wait for each answer: the load backs off when the API slows — good for "what do N people experience?"
  • Requests per second keeps the rate whatever happens — the honest way to test capacity; requests not sent means it couldn't keep up.
  • "50 users" means nothing without think time; ramp up gradually; and make sure the test machine isn't the bottleneck.

In the app: Simulated users or requests per second · Shape over time · Pacing options

Next: Reading results

A question these lessons don’t answer? Write to support@apitestcenter.com — we add lessons for the questions people ask.