Performance tests

How many concurrent users can your website handle?

“How many users can our website handle?” sounds like a question with a single-number answer. The answer, however, depends on what the users do, what response-time and error-rate limits you consider acceptable, and which infrastructure runs the system. A reliable capacity estimate therefore requires measurement under clearly defined conditions.

Common problem: capacity is estimated without measurement

Capacity is sometimes estimated from past traffic or server size. Such an estimate can be a useful starting point, but it does not account for changes in the application, data, infrastructure, or customer behaviour. Once a resource such as database connections, memory, or worker threads is exhausted, the system can also slow much more sharply than it does under a lower load.

A simple test of one address can verify a specific technical assumption, but it does not represent all traffic by itself. Real customers sign in, search, fill their carts, and pay. If a test does not account for these journeys and their proportions, its result has limited value. The average response time alone can also hide slower requests at the edge of the distribution.

How capacity is measured

Scenarios based on real behaviour. We start from how users actually move through the system, not from calls to a single URL. We gradually increase the load and observe when response times cross the limit that users still tolerate.

We monitor percentiles as well as the average. The p95 and p99 values show the thresholds below which 95% and 99% of measured responses fall. Together with the error rate, throughput, and system metrics on a shared timeline, they help form a hypothesis about why the system slowed down. The cause then needs to be confirmed with other evidence, such as logs, configuration, or repeated measurement.

We try several types of load: normal traffic (load) as well as the system’s limit (stress). The ceiling is not one universal number: it differs under steady traffic and a sudden peak.

How to interpret the number

The result is not “the website can handle 5,000 people”. It is a number with conditions: how many concurrent users the system can handle, at what response time (for example, p95 below two seconds), and for which scenario (browsing and a purchase with payment may have different demands). Without these three pieces of information, the number is only an impression.

The result therefore also includes a likely bottleneck, such as the database, application, external service or infrastructure, and a proposal for how to verify it further. Sometimes a query or configuration change helps. In other cases, the application or infrastructure needs to change. Measurement thus provides a basis for deciding where to invest time and budget.

Users, requests and arrival rate

A daily analytics visitor count is not concurrency. A test’s virtual-user count cannot be equated with customer numbers without describing the scenario either. One visit may pause between actions, while another sends several requests simultaneously. Record the journey, call count, pauses and activity mix in the model.

A simple working example: 100 virtual users repeat a journey containing five sequential requests. If the whole iteration, including pauses, averages 10 seconds, the steady-state rate is approximately 10 iterations and 50 requests per second. At 20 seconds it falls to roughly five iterations and 25 requests per second, although there are still 100 users. This calculation assumes repeated complete journeys with no additional calls and is not a website measurement.

k6 distinguishes open and closed models. In a closed model, a user waits for an iteration to finish. In an arrival-rate model, new iterations are scheduled independently of previous completions. Choose according to the question you want to measure.

When a result counts as acceptable

Agree on limits for important operations before testing. An illustrative requirement might be p95 below two seconds and fewer than one percent errors at the agreed load. These numbers are only examples. They come from product needs, rather than tool defaults. k6 thresholds let you define metric pass criteria.

Check functional outcomes too. A fast HTTP 200 response is insufficient if no order was created or the wrong amount was saved. Assess scenarios separately so numerous fast browsing requests do not hide slow payments. If processing completes in the background, add checks for the final state and queue growth.

Preparing a measurement without measuring the generator’s limit

Use the agreed environment, accounts and a data volume resembling the intended traffic. Record differences from production: infrastructure, caches, integrations, configuration and automatic scaling. Without further evidence, a smaller test system cannot be converted into a production estimate by simple multiplication.

Start with a small load and verify the scenarios. Then increase it through agreed levels. Observe each long enough to account for response times, queues and any scaling. Agree on stopping if data is being damaged or the impact becomes unacceptable. Include payment or other external services only in an approved mode, and identify results that use service replacements.

Check the generator’s CPU, memory and network too. The k6 dropped_iterations metric reports iterations that did not start. They may relate to configuration or to the target slowing down. Without diagnosis, do not automatically treat them as website errors or successfully handled load.

What to deliver after the test

Report measured throughput, concurrency or arrival rate, run scope and duration, application version, environment, data model and each criterion’s result. If testing found the last acceptable and first unacceptable levels, report that range. Do not present coarse measurement steps as a precise ceiling.

After reducing load, check recovery too: whether queues drain, response times recover and data remains intact. Leave planning headroom according to uncertainty and the expected type of peak. There is no universally safe percentage.

Verify the proposed repair with another test using a comparable scenario and configuration. Explain any changes to data, generators or external services in the report. Reassess the original estimate after material changes to the application, traffic or infrastructure.

What measured capacity gives you

Next step

First define the important user journeys, expected load, acceptable response-time limits, and the environment in which you want to measure. Always interpret the result together with these conditions. If you are preparing for a seasonal peak, also read whether your online store can handle Black Friday.

Related topics

You might also be interested in

You want to know the capacity of the system in advance

Load and stress tests will show the behavior and capacity of the system in agreed conditions before the expected peak.