Example scenario: load testing an online shop before a campaign
This article shows how to measure system capacity before a major campaign, identify a bottleneck and turn the results into clear priorities.
Starting point
Consider an online store before Black Friday or a company preparing to launch a large advertising campaign. The day is approaching when the system may receive several times its usual traffic. Its capacity has not been measured, however, and the team has only its experience from past operations.
What usually happens
Capacity is estimated without a current measurement. The company may then invest in infrastructure it does not need or, conversely, overlook a risk in the purchasing process—the part on which revenue directly depends.
Simple synthetic calls to one address can verify a specific part of the system, but they do not represent all customer behaviour. Customers sign in, search, fill their carts, and pay. If only the average response time is monitored, slower requests may disappear within it.
How we address it
We design scenarios around the real behaviour of your users, not as artificial requests to a single URL. We start from how customers actually move through the system.
Depending on the risk, we select an appropriate combination of load types: expected traffic (load), the system’s limits (stress), a sudden peak after an advertising launch (spike), or long-term stability (soak), which can reveal issues such as slow memory leaks.
We measure response-time percentiles (p95 and p99), the error rate, and throughput. If application, database, and infrastructure metrics are available, we compare them on one timeline. The relationships help identify which part of the system is a likely bottleneck and what needs further verification.
We build on the open-source k6 and Locust runners. The performance and configuration of the available infrastructure determine the scope of a local test; commercial cloud services are not required. We use JMeter for older non-HTTP protocols or when you already have an existing suite.
What you gain
- Capacity measured for specific scenarios and agreed response-time and error-rate limits.
- A likely bottleneck and a plan for confirming the cause before the campaign.
- Evidence for deciding whether and where to invest in infrastructure: measurements instead of guesswork.
- Better preparation for the busiest day of operation and a list of remaining risks.
First step
Prepare a typical user scenario, an estimate of expected traffic, acceptable response-time limits, and the campaign date. This information will help determine the test scope and how much lead time is needed for potential changes and repeated measurement.