Black Friday readiness: an e-commerce load testing calendar
This page lays out what to test and when, so the site keeps selling on sale day: the traffic mix, 8 scenarios, a performance budget, 30- and 12-day calendars, PostgreSQL and monitoring during the sale. A complete importable test is at the end.
1. The traffic mix
Sale traffic is not just the home page. The test's load should split the way users really move through the site. Take it from your own analytics; if you have none, start with this mix:
| Flow | Share |
|---|---|
| Home page and categories | 30% |
| Product detail | 30% |
| Search and filter | 15% |
| Cart | 10% |
| Sign-in and sign-up | 5% |
| Order and payment | 10% |
2. The performance budget
Write down the pass condition before you test. A typical budget for a sale:
- p95 < 500 ms: 95% of requests take less than half a second.
- p99 < 1,000 ms: even the slowest 1% stays under a second.
- 5xx < 0.1%: fewer than one server error in a thousand requests.
- Cart success > 99.9%: adding to the cart almost never fails.
In the test below these four lines are thresholds; if one does not hold, the test fails.
3. 8 scenarios
- Category and listing: category pages with paging and sorting; shows whether the cache is warm.
- Search and filter: different queries and filters; the search engine and database indexes are pushed here.
- Product detail and stock: random products and the stock query; sale items are the most read.
- Cart: create, add, view. Also try concurrent requests to the same cart (adding from two tabs at once); locking problems and lost rows show up here.
- Checkout and payment: send an Idempotency-Key with the order request, repeat the same request and check that no duplicate order appears.
- Spike: a sudden jump from 100 to 5,000 VUs; that is what happens when the sale opens. How fast do autoscaling and connection pools catch up?
- Soak: 4–8 hours at a steady load; memory leaks, filling disks and unclosed connections only show in a long run.
- Dependency failure: what does the site do when the payment service or Redis goes down under load? An error message, a timeout or a cascade?
Payment sandbox: never point a load test at the live payment provider. Use the provider's sandbox and test cards, or stand in for the payment and SMS providers with Spitfire mock services (load testing before a sale).
4. The test: the traffic mix and budget in one file
Six scenarios carry the mix's shares as requests per second (30 + 30 + 15 + 10 + 5 + 10 = 100 iterations a second). The thresholds are the budget: p95 and p99 on req_duration, checks for the "5xx yok" (no 5xx) check on every step, req_failed for the cart scenario. POST steps that change data are marked modifiesData; Spitfire asks before it runs them. Change the addresses and rates to fit your site.
The Black Friday traffic mix, https://shop.example.com, checkout against a sandbox:
{
"name": "Black Friday: e-commerce traffic mix",
"variables": { "base": "https://shop.example.com", "password": "Test1234!" },
"options": { "timeout": "10s", "gracefulStop": "30s" },
"scenarios": [
{ "name": "category",
"executor": { "type": "ramping-arrival-rate", "startRate": 0, "timeUnit": "1s", "preAllocatedVUs": 10, "maxVUs": 25,
"stages": [ { "duration": "2m", "target": 30 }, { "duration": "10m", "target": 30 } ] },
"steps": [
{ "id": "home", "name": "Home page", "request": { "url": "{{base}}/" },
"checks": [ { "type": "status", "value": 200 }, { "name": "no 5xx", "type": "status", "op": "lt", "value": 500 } ] },
{ "id": "category", "name": "Category list",
"request": { "url": "{{base}}/api/categories/{{$randInt 1 40}}/products", "query": [ { "key": "page", "value": "{{$randInt 1 10}}" } ] },
"checks": [ { "type": "status", "value": 200 }, { "name": "no 5xx", "type": "status", "op": "lt", "value": 500 } ] } ] },
{ "name": "product",
"executor": { "type": "ramping-arrival-rate", "startRate": 0, "timeUnit": "1s", "preAllocatedVUs": 10, "maxVUs": 25,
"stages": [ { "duration": "2m", "target": 30 }, { "duration": "10m", "target": 30 } ] },
"steps": [
{ "id": "product", "name": "Product detail", "request": { "url": "{{base}}/api/products/{{$randInt 1 5000}}" },
"extract": [ { "var": "productId", "from": "jsonpath", "expr": "$.id" } ],
"checks": [ { "type": "status", "value": 200 }, { "name": "no 5xx", "type": "status", "op": "lt", "value": 500 } ] },
{ "id": "stock", "name": "Stock", "request": { "url": "{{base}}/api/products/{{productId}}/stock" },
"checks": [ { "type": "status", "value": 200 }, { "name": "no 5xx", "type": "status", "op": "lt", "value": 500 } ] } ] },
{ "name": "search",
"executor": { "type": "ramping-arrival-rate", "startRate": 0, "timeUnit": "1s", "preAllocatedVUs": 5, "maxVUs": 10,
"stages": [ { "duration": "2m", "target": 15 }, { "duration": "10m", "target": 15 } ] },
"steps": [
{ "id": "search", "name": "Search and filter",
"request": { "url": "{{base}}/api/search", "query": [ { "key": "q", "value": "kampanya" }, { "key": "category", "value": "{{$randInt 1 40}}" },
{ "key": "sort", "value": "price" }, { "key": "page", "value": "{{$randInt 1 5}}" } ] },
"checks": [ { "type": "status", "value": 200 }, { "name": "no 5xx", "type": "status", "op": "lt", "value": 500 } ] } ] },
{ "name": "cart",
"executor": { "type": "ramping-arrival-rate", "startRate": 0, "timeUnit": "1s", "preAllocatedVUs": 5, "maxVUs": 15,
"stages": [ { "duration": "2m", "target": 10 }, { "duration": "10m", "target": 10 } ] },
"steps": [
{ "id": "cart_create", "name": "Create cart", "once": true,
"request": { "method": "POST", "url": "{{base}}/api/carts", "modifiesData": true },
"extract": [ { "var": "cartId", "from": "jsonpath", "expr": "$.id" } ],
"checks": [ { "type": "status", "op": "in", "value": [200, 201] }, { "name": "no 5xx", "type": "status", "op": "lt", "value": 500 } ] },
{ "id": "cart_add", "name": "Add to cart",
"request": { "method": "POST", "url": "{{base}}/api/carts/{{cartId}}/items", "modifiesData": true,
"body": { "type": "json", "content": "{\"productId\":{{$randInt 1 5000}},\"quantity\":1}" } },
"checks": [ { "type": "status", "op": "in", "value": [200, 201] }, { "name": "no 5xx", "type": "status", "op": "lt", "value": 500 } ] },
{ "id": "cart_view", "name": "View cart", "request": { "url": "{{base}}/api/carts/{{cartId}}" },
"checks": [ { "type": "status", "value": 200 }, { "name": "no 5xx", "type": "status", "op": "lt", "value": 500 } ] } ] },
{ "name": "login",
"executor": { "type": "ramping-arrival-rate", "startRate": 0, "timeUnit": "1s", "preAllocatedVUs": 3, "maxVUs": 5,
"stages": [ { "duration": "2m", "target": 5 }, { "duration": "10m", "target": 5 } ] },
"steps": [
{ "id": "login", "name": "Sign in",
"request": { "method": "POST", "url": "{{base}}/api/login",
"body": { "type": "json", "content": "{\"email\":\"user{{__VU}}@example.com\",\"password\":\"{{password}}\"}" } },
"checks": [ { "type": "status", "value": 200 }, { "name": "no 5xx", "type": "status", "op": "lt", "value": 500 } ] } ] },
{ "name": "checkout",
"executor": { "type": "ramping-arrival-rate", "startRate": 0, "timeUnit": "1s", "preAllocatedVUs": 5, "maxVUs": 20,
"stages": [ { "duration": "2m", "target": 10 }, { "duration": "10m", "target": 10 } ] },
"steps": [
{ "id": "pay_login", "name": "Sign in to pay", "once": true,
"request": { "method": "POST", "url": "{{base}}/api/login",
"body": { "type": "json", "content": "{\"email\":\"buyer{{__VU}}@example.com\",\"password\":\"{{password}}\"}" } },
"extract": [ { "var": "token", "from": "jsonpath", "expr": "$.token" } ],
"checks": [ { "type": "status", "value": 200 }, { "name": "no 5xx", "type": "status", "op": "lt", "value": 500 } ] },
{ "id": "pay_cart", "name": "Checkout cart",
"request": { "method": "POST", "url": "{{base}}/api/cart/items", "modifiesData": true,
"headers": [ { "key": "Authorization", "value": "Bearer {{token}}" } ],
"body": { "type": "json", "content": "{\"productId\":{{$randInt 1 5000}},\"quantity\":1}" } },
"checks": [ { "type": "status", "op": "in", "value": [200, 201] }, { "name": "no 5xx", "type": "status", "op": "lt", "value": 500 } ] },
{ "id": "checkout", "name": "Checkout (sandbox)",
"request": { "method": "POST", "url": "{{base}}/api/checkout", "modifiesData": true,
"headers": [ { "key": "Authorization", "value": "Bearer {{token}}" }, { "key": "Idempotency-Key", "value": "{{$uuid}}" } ],
"body": { "type": "json", "content": "{\"paymentMethod\":\"sandbox\",\"card\":\"4111111111111111\"}" } },
"checks": [ { "type": "status", "value": 201 }, { "type": "jsonPath", "path": "$.status", "value": "confirmed" },
{ "name": "no 5xx", "type": "status", "op": "lt", "value": 500 } ] } ] }
],
"thresholds": [
{ "metric": "req_duration", "expr": "p(95)<500" },
{ "metric": "req_duration", "expr": "p(99)<1000" },
{ "metric": "checks", "filter": { "check": "no 5xx" }, "expr": "rate>0.999" },
{ "metric": "req_failed", "filter": { "scenario": "cart" }, "expr": "rate<0.001" }
]
}For the spike scenario it is enough to swap the executor: two minutes at 100 VUs, up to 5,000 VUs in 30 seconds, five minutes at the peak, then down.
"executor": { "type": "ramping-vus", "startVUs": 100,
"stages": [
{ "duration": "2m", "target": 100 },
{ "duration": "30s", "target": 5000 },
{ "duration": "5m", "target": 5000 },
{ "duration": "1m", "target": 100 }
] }This test comes inside the product as the E-commerce / Sale readiness template with the next Spitfire release. Until then, save the JSON to a file and open it with Tests → Open file.
5. The 30-day calendar
| Days left | Work |
|---|---|
| 30 | Baseline: today's p95, p99, error rate and resource use under live traffic |
| 21 | Load test: the expected sale traffic, with the traffic mix |
| 14 | Stress test: 2–3 times the expected load, the first layer that breaks |
| 10 | Spike test: a sudden jump from 100 to 5,000 VUs |
| 7 | Soak test: 4–8 hours at a steady load (memory and connection leaks) |
| 3 | Checkout test: sandbox payment, idempotency, duplicate orders |
| 1 | Smoke test: a short, light check against the final version |
| Kampanya | Synthetic monitoring and alerts 24/7 |
If you are late: the 12-day calendar
| Days left | Work |
|---|---|
| 12 | Baseline |
| 11 | Load test |
| 9 | Stress test |
| 8 | Spike test |
| 7 | Soak test (overnight) |
| 6–4 | Fixes and reruns, compared with the previous run |
| 3 | Checkout test |
| 2 | Code freeze; synthetic checks and alerts set up |
| 1 | Smoke test |
| Kampanya | Synthetic monitoring 24/7 |
6. Monitoring during the sale
Tests cover the time before the sale; during it, synthetic monitoring takes over. Run the critical flow every few minutes: home → search → product → add to cart → checkout page. No payment is made; the flow ends when the checkout page opens.
| Alert | In Spitfire |
|---|---|
| p95 > 500 ms | APM alert rule (p95), with "for (min)" |
| Error rate > 0.1% | APM alert rule (error rate) |
| PostgreSQL connection use > 80% | Built-in database monitoring finding (80% of max_connections) |
| CPU > 85% | Our advice. The built-in server monitoring finding opens at 90% for 5 minutes |
| RAM > 90% | Built-in server monitoring finding (5 minutes) |
| A critical synthetic check fails twice in a row | Synthetic monitoring: an incident opens after 2 bad results in a row |
Synthetic checks run every 1, 5, 15 or 60 minutes; when an incident opens, the notice arrives by Slack, Teams, e-mail, SMS, voice call or webhook. After a deploy during the sale, the checks run every minute for 30 minutes.
7. PostgreSQL: the usual bottleneck
Under sale load the application server is usually not what waits; it waits for the database. Three places to look:
- Connection pool wait time: how long does the application wait for a free connection? In OpenTelemetry metrics,
db_client_connection_pending_requestsshows the waiting requests. Pool size × application replicas must stay under PostgreSQL'smax_connections. - PgBouncer: with many application replicas, a pooler such as PgBouncer shares a few real connections; in transaction mode, check your prepared statement settings.
- pg_stat_statements: the queries with the most total time. Look before and after the test; the sale items' queries move up the list.
In Spitfire, database monitoring warns when connections pass 80% of max_connections and fills the slow queries table from pg_stat_statements. At the breaking point, the result page lists what happened at the same time; for example, that the connection pool filled up (waiting connections 0 → 48). That means "at the same time"; it does not claim the cause. The APM root cause finding shows what share of a slow request's time went into which child operation:
62% of the time was spent in orders-db: SELECT … FROM stock WHERE product_id = $1 FOR UPDATE
8. Six steps with Spitfire
- Baseline: APM shows live traffic's p95, p99 and error rate; take the first measure there.
- Load tests: load, stress, spike and soak run from the same test with a different executor; a breakpoint test finds the ceiling.
- Root cause: during the test, APM and traces show which service and which query slowed down (OpenTelemetry and the root cause).
- Release comparison: the CI/CD gate checks each release against the budget and compares it with the previous run; you see whether a fix really worked.
- Checkout test: with a sandbox payment, an Idempotency-Key and a duplicate-order check.
- Synthetic monitoring 24/7: the critical flow and alerts for the whole sale.
You do not need to install k6, Grafana, Prometheus and Tempo separately for these six steps. If you already run an OpenTelemetry Collector, it sends its data to Spitfire; if you have Prometheus (or Tempo, Loki), Spitfire queries it.
Black Friday readiness package (until 30 November 2026): buying a one-time 1-month Growth or Scale license includes campaign-period support at no extra charge: a same-day first reply to e-mail every day 09:00–21:00 (Istanbul time) during a 14-day period you pick. Periods are limited. The template on this page is included too.
Frequently asked
How early should Black Friday load testing start?
How many VUs should I test with?
Can I load test against the live payment provider?
How do I measure the 5xx rate during a test?
"op": "lt", "value": 500 to every step and give it the same name. Then write a threshold on the checks metric filtered by that check name; in the test above it is rate>0.999, so 5xx stays below 0.1%.Spitfire installs on Docker or Kubernetes with one command; every testing feature and protocol is open in the free edition.