Short answer
Start a performance test before a campaign or Black Friday 4-6 weeks before the peak, so there’s time left for fixes and a repeat test. Assume traffic 2-3 times higher than the peak from the previous campaign, test 3-5 key paths (home page and product lists, search, cart, payment, login) and set thresholds before the test, e.g. 95% of responses under 1 second and fewer than 1% errors. After the fixes, repeat the test and freeze changes 1-2 weeks before the peak.
6-4 weeks before the peak: preparation
- Goal and thresholds. How much traffic the system must handle and what “handle” means. Example thresholds are in the table below.
- Traffic model. The peak from the previous campaign, a split into scenarios, headroom. How to work it out is covered in how many users to simulate in a load test.
- Environment. A copy of production with the same configuration, or production outside traffic hours. A test on a small instance with an empty database tells you little.
- Test data. Products, accounts, the campaign’s discount codes, payment test accounts.
- Agreements with providers. The payment operator (sandbox limits), CDN and WAF, which can block traffic from the load generator, hosting and third-party service providers.
4-2 weeks before the peak: tests
- Load test at the expected peak level with headroom.
- Spike test: a sudden jump in traffic, like a promotion starting at midnight or a newsletter send.
- Stress test: at what traffic the system stops meeting the thresholds and what breaks first.
- Soak test: several hours of constant load to reveal memory and connection leaks.
- Monitoring during the test: CPU, memory, database connections, queues, response times of external services.
2-1 weeks before the peak: fixes and readiness
- Fixes and a repeat test of the same scenarios, so the results can be compared.
- Change freeze 1-2 weeks before the peak: critical fixes only.
- Failure plan: who is on call, how to roll back a release, which heavy features can be switched off (recommendations, full-text search, chat), whether there’s a queue page.
- Alerts set to the thresholds from the test, not to default values.
Example thresholds
| metric | example threshold |
|---|---|
| page response time, 95th percentile | under 1 s |
| API response time, 95th percentile | under 500 ms |
| error rate | under 1% |
| successful payments | the same as under normal traffic |
| database CPU load | under 70-80% at the expected peak |
These are example numbers. Take yours from production data or business assumptions and write them down before the test. Why to look at percentiles rather than the average is explained in your first performance test in JMeter.
If only a few days are left
The full plan won’t fit any more, but a few things still give a lot:
- a spike test of the cart and payment outside traffic hours, because that’s where an outage costs the most;
- a cache and CDN check: are product pages and images served from the cache rather than the application server;
- scaling limits: does autoscaling have a high enough upper limit, and can the database keep up with more application servers;
- prepared switches: a way to quickly turn off heavy features without a release;
- an on-call rota and a communication channel for the peak.
How I can help
As part of performance testing I prepare a traffic model, 3-5 JMeter scenarios and a report with response times, error thresholds and bottlenecks. It usually costs PLN 10,000-15,000 net and takes 2-3 weeks, so before the holidays or your next campaign it’s worth starting well ahead. Describe your system, campaign date and expected traffic in the contact form.