Skip to content
All projects

Preparing an online store for Black Friday: load testing and a capacity plan

Project write-up

The client is described by industry and scale, without a name. KPI figures are targets agreed with the client after a baseline measurement.

In brief

Problem
Last season the store slowed down at peak hours, and the cart and payments reported errors.
Approach
A load model built from last season's data, with scenarios for browsing, search, cart, and payment, focused on traffic spikes after a newsletter is sent.
Goal
p95 response time of key transactions: within the SLA, e.g. ≤ 2 s; Throughput at the peak profile: ≥ 150% of the forecast peak.

Client context

Online retail runs on the rhythm of campaigns and seasonal peaks: Black Friday, the holidays, sales. An outage at the peak means lost revenue that cannot be recovered. The client is an online store selling electronics and home appliances, for which Black Friday and the holiday period generate a significant share of annual revenue.

Challenge

Last season the store slowed down at peak hours, and the cart and payments reported errors. The team does not know which components are the bottleneck.

Requirements and constraints

  • The Omnibus Directive and the Polish act on price information require showing the lowest price from the 30 days before a discount, and disclosing how reviews are verified and whether the seller is a business. The pricing engine and the catalog must store price history. (source)
  • PCI DSS v4.0 applies to anyone who processes payment card data. Version 4.0 tightens the requirements for multi-factor authentication, scripts on payment pages, and segmentation penetration tests. (source)
  • GDPR, that is Regulation (EU) 2016/679, requires data minimization, a legal basis for processing, and processing agreements, and for high-risk processing also a data protection impact assessment (DPIA). In practice it rules out copying production data into test environments without anonymization or pseudonymization. (source)
  • Project constraints: work only on anonymized or synthetic data outside production, access to systems through the client's infrastructure, and every deliverable shipped with documentation that the client's team can take over.

Approach and architecture

We start performance testing with a load model, not a tool: from production logs and business data we derive the traffic profile (transaction mix, peaks, distribution over the day), and only then do we write scripts. Every test has a hypothesis and a pass criterion, and we analyze the results together with infrastructure metrics and APM traces, so that we pinpoint the bottleneck instead of merely stating that it is slow.

A load model built from last season's data, with scenarios for browsing, search, cart, and payment, focused on traffic spikes after a newsletter is sent. Tests run in several cycles with fixes in between, followed by a capacity plan with on-call duty.

Key elements of the solution:

  • A load model from last season's data
  • Spike scenarios after a newsletter
  • Search and cart tests
  • A capacity plan and a change freeze

Team and roles

RoleCountResponsibility
Performance test engineer2load model, scripts, bottleneck analysis
SRE engineer1observability, SLOs, incident procedures
Product owner and domain experts (client side)as neededpriorities, business decisions, acceptance

Phased schedule

PhaseWeeksDeliverable
1. Load model and criteria1–1traffic profile, SLA, test plan
2. Preparing scripts and data2–3scripts, data generator, monitoring
3. Test cycles and tuning4–6cycle reports, list of bottlenecks
4. Confirmation test7–7SLA compliance report
5. Performance regression in CI8–8automatic thresholds in the pipeline

Technology stack

k6, Grafana, Prometheus, Elasticsearch, Redis, CDN.

Risks and how we mitigate them

RiskHow we mitigate it
Seasonal peaks during the projecta change freeze before the peak, performance tests against the peak profile, an on-call schedule
A performance test environment smaller than productiona table of environment differences, scaling results only where behavior is linear, a confirmation test on production in a maintenance window
Dependence on an external vendor and its deadlinesearly agreement on API contracts, a stub environment, a weekly dependency review

Measurable goals and KPIs

The values below are targets that we agree with the client after a baseline measurement in the first phase.

KPITargetHow it is measured
p95 response time of key transactionswithin the SLA, e.g. ≤ 2 sAPM and test reports
Throughput at the peak profile≥ 150% of the forecast peakload test
Error rate under load< 0.1%load test, application logs

Lessons learned and good practices

Search and the cart are the most common bottlenecks at the peak. A change freeze before the peak is just as important as the tests. A load profile built from real logs matters more than the choice of tool.

Why B2B.net

B2B.net S.A. has operated since 2015 and has worked for more than 50 brands, mainly where audits are routine: in banks, insurers, and critical infrastructure. We are an accredited exam center, so a test methodology is not a declaration for us but a working standard. We give a first proposal of specialists within 24 hours, and a team can start within 5 business days.

Acceptance criteria

Each phase ends with a formal acceptance against criteria agreed at the start. In this implementation, acceptance covers: traffic profile, SLA, test plan; scripts, data generator, monitoring; cycle reports, list of bottlenecks; SLA compliance report; automatic thresholds in the pipeline. Final acceptance requires a KPI measurement report against the baseline, complete documentation handed over to the client's team, and a list of recommendations for the next stage, with a cost and risk assessment for each.

Next step

Let's talk about your project. We will get back to you within 24 hours with a quote or a proposal of engineers, and a team can start within 5 business days. Contact: office@b2bnetwork.pl.

What would this look like for you?

Book a 30-minute call. We will prepare a plan for the first weeks and a team matched to your system.

Let's talk

B2Bnetwork · B2B.net S.A. · accredited exam center. We describe clients by industry and scale, without names.

More projects: E-commerce