Performance tests

Black Friday load testing for online shops

A campaign takes months to prepare: discounts, emails, advertising, and stock. If traffic rises more sharply than the system can handle, the online store may begin responding slowly or failing precisely at the cart and payment steps. The problem then affects customers whom you brought to the website through a paid campaign.

A performance problem does not have to result in a complete outage. It may appear as gradual slowing or errors in only a portion of requests. Without technical metrics, it is then difficult to distinguish the effect of performance from other causes of a drop in conversion.

Common problem: an estimate without a load test is not enough

Normal traffic alone does not confirm how the system will behave during a campaign. Capacity is affected by the customer scenario, the amount and structure of data, external services, and the available infrastructure. Once a resource such as database connections, memory, or worker threads is exhausted, response times and the error rate can deteriorate more sharply.

Schedule measurement before the campaign so there is time to assess and address the limitations found.

How to measure capacity

We design scenarios around important customer journeys, such as arriving on the website, finding a product, adding it to the cart, registering, and paying. A simple home-page test can be useful for a partial measurement, but it does not load the same parts of the system as the complete purchase process.

We then gradually increase the load and observe what happens:

Normal traffic (load). Can the system handle the expected traffic with response times that are acceptable to customers?

The limit (stress). At what load does the system stop meeting the agreed limits, and which resource is approaching its capacity at that time?

A sudden peak (spike). Traffic can rise in a short time after a newsletter is sent or an advertising campaign launches. The test verifies how the system handles the jump and whether it returns to its normal state afterwards.

Long-term stability (soak). Can the system maintain the agreed performance level during a prolonged load? The test duration is selected according to the risk and operational profile. The test may reveal memory leaks, unclosed connections, or storage that gradually fills up.

We evaluate response times with both the average and percentiles. The average alone can hide a small share of very slow requests. P95 and p99 show thresholds for 95% and 99% of measured response times. These values need to be interpreted together with the error rate, throughput, and the specific scenario.

What the test result gives you

The result is capacity measured for specific scenarios and agreed response-time and error-rate limits. The metrics can indicate a likely bottleneck, such as slow SQL queries, waits for a database connection, or a saturated infrastructure resource, and determine what needs further verification. Recommendations can be ranked by risk, expected benefit, and effort.

We compare the test metrics with the available application, database, and infrastructure metrics on one timeline. Timing relationships help form a hypothesis about the cause, which must be confirmed with additional data or a repeated test.

Build a load profile from traffic forecasts

A marketing forecast of “6,000 visits an hour” means approximately 1.7 new visits per second with evenly distributed arrivals. A short peak of 300 visits a minute means 5 per second. Neither number is a concurrent customer count or an HTTP request rate. A visit can take different amounts of time and trigger multiple calls. These are model values, rather than a forecast for your shop.

Prepare a journey mix, such as 70% catalogue browsing, 20% search and 10% purchase completion. This mix is a working example, rather than a conversion forecast. Adapt it to available data and campaign expectations. Record ramp-up, peak, duration and return to normal traffic. For a newsletter, consider interest concentrated on one product rather than evenly distributed across the catalogue.

An open load model separates new iteration arrivals from completion of previous iterations. It is useful when new customers keep arriving while the website slows down. With a fixed virtual-user count, slowing responses can reduce the number of journeys started. Verify the load actually generated and generator limitations before drawing conclusions.

Verify purchase correctness during the peak too

A fast response is insufficient if the customer receives an old price, another customer’s basket or a duplicate order. Define correct contents and state for each scenario, rather than only a successful HTTP code. Assess these situations in a controlled environment:

Situation What the check should establish
A campaign price change with populated caches Displayed and saved prices match the agreed rules
Concurrent purchases of the last stock units Reservations and accepted orders respect inventory rules
Resubmission after a slow response Record state is traceable and no unintended duplicate write occurs
A growing order queue Confirmed orders are processed within the agreed time after the peak too

Use separate identifiers and known test data. Completion of an HTTP response does not necessarily mean inventory processing or invoicing has finished. For an asynchronous process, inspect final state and processing time. Declare an incomplete process in the report even if the website itself responded quickly during the test.

Caches, scaling and the gateway have their own limits

Compare the agreed cache state before testing with the state expected during the campaign. A warmed catalogue may not represent the first surge for new products. With autoscaling, monitor when capacity appears and when the application is ready to receive requests. For example, AWS EC2 Auto Scaling describes warmup and its influence on scaling metrics. Setting a higher maximum instance count alone does not establish timely readiness.

For payments, separate functional integration checks from provider load testing. Stripe discourages using a sandbox as the target of a large load test. Its limits and latency profile differ, and recommended request replacements need appropriate simulated latency. Verify other gateways’ rules separately. A test using replacements does not establish the provider’s live capacity.

Handle shop writes and side effects separately: a payment sandbox does not itself disable emails, invoices, reservations or analytics. Agree on accounts, scope, cleanup and stop conditions. Choose staging or production according to the question and test consequences. Stress testing to failure belongs within an approved scope, rather than automatically on the live website.

What should be clear before launching the campaign

The report should identify the build, environment, data, profile, achieved load, limits and unperformed areas. Distinguish readiness within the verified scope, readiness subject to an unresolved condition and missing evidence. If the target was below the expected peak, do not relabel the result as confirmation of the entire campaign.

Repeat a comparable run after a fix. When a price, coupon, configuration or scaling policy changes, assess which evidence needs refreshing. Assign an operational-monitoring owner, a response to deterioration and recovery verification too. A successful test reduces specific uncertainties, rather than promising flawless handling of every future surge. These examples propose preparation, rather than report measurements of a client shop.

When to start

The required lead time depends on the size of the system, environment availability, and the difficulty of potential changes. For a larger campaign, it may be useful to start several weeks in advance so that there is time for the first measurement, changes, and a repeated test. One week before launch may allow only limited verification and mitigation of the greatest risks.

The same reasoning applies before launching a new product, a large advertising campaign, or a migration to different infrastructure.

Next step

Prepare typical customer journeys, an estimate of expected traffic, the campaign date, and the response-time and error-rate limits you consider acceptable. This information can be used to determine a realistic test scope and the required lead time.

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.