Load testing
Нагрузочное тестирование
This type of performance test checks whether a system stays fast and reliable under the traffic it is expected to handle, including planned peaks.
Also known as: стресс-тестирование
What load testing tells you
A checkout can work perfectly for one shopper and still time out when hundreds of shoppers try to place orders. Load testing recreates an expected workload and checks whether the application meets its response-time and error-rate targets. A forecast holiday rush is a valid load-test scenario. A stress test goes beyond the expected range on purpose to learn how the system degrades and whether it recovers once traffic drops.
Build a workload, not just a traffic number
Start with a concrete question: can the service handle the busiest half hour of a sale? Use traffic logs or a forecast to choose the mix of operations, such as browsing, searching, and submitting orders. Include realistic data volumes and pauses where appropriate. Hammering one cached product page might give you a clean result without exercising the database paths that matter.
Choose a model that fits the question. If requests arrive independently of how quickly the service responds, schedule them at a target arrival rate. If you want to model shoppers who wait for one page before opening the next, use virtual users that follow that sequence. With the second model, a slowdown can reduce requests per second even though the user count stays fixed. In either case, record the actual traffic the load generator sends rather than assuming it hit the configured target.
Example: a ticketing API
Suppose the API needs to handle 250 requests per second for 30 minutes. Ramp up to the target, hold it, and measure the steady-load window separately from the ramp. The team sets two pass criteria: p95 latency for seat reservations must be at most 500 ms, and fewer than 1% of all requests may fail. A p95 of 500 ms means roughly 95% of measured reservation requests complete within half a second. Track timeouts and errors separately so they don't disappear from the result when you look at successful responses.
If latency climbs while completed requests per second flatten out, check for growing queues or requests waiting on a dependency. Low application CPU doesn't rule out a bottleneck: the app could be waiting for database connections. Check the load generator too. If it couldn't produce 250 requests per second, the run hasn't answered the original question. After a fix, repeat the same workload so the comparison is meaningful.
Where it matters and what interviewers look for
Teams use load tests before major launches, when planning capacity, and after changes such as a new cache or database migration. Report differences between the test environment and production: passing with a small database and warm caches does not establish capacity with production data and cold caches. In an interview, explain what traffic you'd generate, what would count as a pass, and which measurements would help you explain a failure. Naming a tool is less useful than showing how the test answers a capacity question.