How big will the spike be?
On Black Friday 2025, November 28, Swiss retail spending was 98% above the same day a week earlier. This is shown by Monitoring Consumption Switzerland, a project in which the University of St.Gallen analyzes payments by debit and credit card as well as mobile payment methods. The online share of retail rose from 15 to 24% on that day. So online, the spike grows more strongly than in stores.
For your shop’s traffic spike, what counts isn’t the daily revenue but the number of simultaneous requests in the busiest quarter hour. A newsletter, a push notification or a TV ad brings many people within a few minutes, and they all want to reach the promotion page at the same time. Your last promotion is the best guide: in the server logs or your analytics tool you can see how many page views per minute there were at the peak and which pages they hit. Plan with headroom on top of that.
What breaks during spikes
During traffic spikes, the whole server rarely goes down at once. Usually one bottleneck fills up first and then drags everything else down with it.
- PHP processes: Each PHP process handles one request after another. When responses slow down, soon all of them are busy. New requests wait or end with a 502 or 504 error, even for pages that would actually be fast.
- Sessions: If sessions are stored in files or in the database, they become a bottleneck themselves when there are many visitors. Many shops also start a session for every visit, including bots.
- Database: Queries that go unnoticed in everyday operation pile up. The number of connections hits its limit, and orders that change the same stock level at the same time wait for each other.
- Cache misses: The page cache only helps if it hits. By default, Varnish and Vinyl Cache pass every request with a cookie straight through; even an analytics cookie is enough if the configuration doesn’t strip it. If the cache is cleared shortly before the start by a deployment, an import or new prices, all requests land on PHP at the same time. Cart, account and checkout can’t be cached anyway.
- Bots and AI crawlers: Bots and crawlers also read rarely visited pages that aren’t in the cache. At Wikimedia, at least 65% of the most expensive traffic comes from bots. At the peak, they tie up processes your customers need.
- External services: If the shop queries prices and availability from the ERP in real time or sends the order confirmation directly at checkout, every delay there holds up a PHP process. In Shopware, for example, email sending runs synchronously by default; it can be offloaded via the message queue.
- Background jobs at the wrong time: Stock imports, product feeds for marketplaces or reports that run right at the peak.
Preparation with lead time
With enough lead time, you prepare your shop for a traffic spike in six steps:
- Load test. With a tool like k6 or Gatling, on a copy with real data volumes: realistic paths from the home page through category and product into checkout, ramped up step by step until response times tip over. The result shows where the limit is and which point breaks first.
- Fix the bottlenecks. Speed up slow queries with suitable indexes, move sessions to a fast store like Redis, and offload email sending, ERP export and PDF generation to a queue. The order confirmation then arrives a few seconds later, and checkout completes immediately. Calls to external services get short timeouts and a plan B.
- Prepare the cache. All of the shop’s public pages belong in the page cache. Adobe explicitly recommends Varnish for Magento and Adobe Commerce, and Shopware advises HTTP caching for any system with many visitors. Cookies the server doesn’t need are stripped before the cache, and personal parts like the cart counter are loaded separately. After every deployment, the cache is warmed up. Grace mode keeps serving expired pages while the new version is generated in the background, which also bridges a brief server outage. How this works together in Varnish and Vinyl Cache is covered in the guide Varnish or Vinyl Cache.
- Slow down bots. Rate limiting caps the number of requests per sender. Real customers who get caught need a way through.
- Monitoring and alerts. Keep an eye on response time, error rate, cache hit rate, database and queue length, with an alert going to a person who is reachable during the promotion.
- Define the procedure. From when does the freeze on deployments and imports apply, who is reachable, how do you scale up if needed, and where is the maintenance page?
What’s still doable at short notice and what needs lead time
There’s still enough time before Black Friday on November 27, 2026, for the traffic spike measures that need a few days of lead time. The rest belongs in the preparation for the next promotion.
| Traffic spike measure | Lead time | What it achieves |
|---|---|---|
| Freeze on deployments and imports during the promotion week | Days | No empty cache and no new bugs at the wrong time |
| Send the newsletter in waves, if your tool supports it | Days | Flattens the spike |
| Check the cache hit rate, strip unnecessary cookies before the cache | Days, if a cache is already running | More requests from the cache, less work for PHP |
| Load promotion pages, categories and bestsellers into the cache before the start | Days | The first visitors don’t hit an empty cache |
| Throttle bots, rate limiting | Days | Processes stay free for customers |
| Monitoring, alerts, availability of people, maintenance page | Days | Problems show up within minutes, not through customer emails |
| Upgrade the server or database with the hosting provider for the promotion days | Days | Helps if the processor or memory is the bottleneck |
| Load test with realistic flows | Weeks | Shows the limit and the first bottleneck |
| Fix slow queries and missing indexes | Weeks | Shorter response times in everyday operation too |
| Offload email sending, ERP export and PDFs to queues | Weeks | Checkout no longer depends on external services |
| Introduce or rework a page cache with Varnish or Vinyl Cache | Weeks to months | The biggest relief for public pages |
| Rework sessions and checkout | Weeks to months | Fewer locks and failures under load |
Major changes shortly before a traffic spike are a risk in themselves. Whatever can’t be properly tested by then is better left until after the promotion.
More server or a better application?
Renting more server capacity for two or three promotion days is legitimate if your hosting provider offers it at short notice. In the long run, though, you’d be paying every month for a problem that lies in the code or the configuration. A cache that hits, on the other hand, takes load off every day.
Three examples from my own work on traffic spikes and caching: a multi-tenant shop platform with Varnish Cache preloads key pages into the cache on deployment, slows down malicious bots with rate limiting while leaving a way through for legitimate customers, and gets by with one powerful server, without horizontal scaling. After the move from Magento 2 to Laravel, the platform stays fast even at peak times thanks to Varnish, without scaling horizontally, and saves server costs as a result. The SciSimple knowledge base serves around 2.5 million pages and absorbs traffic spikes with caching headers for Cloudflare and by caching individual parts of pages.
After the spike
Evaluate the promotion after the traffic spike while the data is fresh: response times, errors, cache hit rate, abandoned checkouts and the point that got tight first. These numbers are the best preparation for the holiday season and the next campaign.
At Unique-P, preparing for traffic spikes is part of the Make your application faster and cheaper to run service. It starts with a fixed-price diagnosis that shows where your application breaks first under load. The measures follow after that, and before the next promotion everything is measured again. Whether your application loses time on the server or in the frontend in everyday operation is covered in the guide Slow: is it the server or the frontend?
How many PHP workers does your traffic spike need?
The cache and load calculator shows, for a traffic spike, how many requests per second reach PHP and how many PHP workers are busy with them at the same time. A page cache such as Vinyl Cache (called Varnish Cache until 2026) answers part of the requests; the rest lands on the application server, where each one occupies a PHP worker until the response is ready.
The cache and load calculator works like this: requests per second × (1 − hit rate) = requests reaching the application server. Requests reaching the application server × response time in seconds = PHP workers busy at the same time on average.
Example values for the calculation
- Requests per second at the peak
- 200
- Cache hit rate in percent
- 60%
- Response time of an uncached request in milliseconds
- 250 milliseconds
- Comparison: hit rate after an improvement
- 90%
Result with example values
- Requests per second reaching the application server
- 80
- PHP workers busy at the same time, on average
- 20
At 200 requests per second at the peak and a cache hit rate of 60 percent, the cache answers 120 requests per second, and 80 requests per second reach the application server. If each of them takes 250 milliseconds, an average of 20 PHP workers are busy there at the same time.
Little’s law in plain terms: how many requests are in progress at the same time equals the requests arriving per second multiplied by how long one request takes in seconds. Each request in progress occupies one PHP worker, a PHP process that handles one request after another. Worked through: 80 requests per second × 0.25 seconds = 20 PHP workers busy at the same time on average.
If the cache hit rate rises from 60 to 90 percent, the load on the application server drops to a quarter (a factor of 4), from 80 to 20 requests per second. The share without a cache hit falls from 40 to 10 percent.
| Hit rate | Answered by the cache, per second | Reaching the application server, per second | PHP workers on average |
|---|---|---|---|
| 0% | 0 | 200 | 50 |
| 60%(example) | 120 | 80 | 20 |
| 80% | 160 | 40 | 10 |
| 90% | 180 | 20 | 5 |
| 95% | 190 | 10 | 2.5 |
Where your application breaks first under load is shown by the Unique-P diagnosis, with a load test if needed:Make your application faster and cheaper to run
Sources
- [1]Monitoring Consumption Switzerland: Retail spending spiked again on Black Friday · University of St. Gallen (HSG), December 2, 2025
- [2]How crawlers impact the operations of the Wikimedia projects · Wikimedia Foundation, April 1, 2025
- [3]Achieving a high hitrate · Vinyl Cache Documentation 9.1
- [4]Grace mode and keep · Vinyl Cache Documentation 9.1
- [5]Grafana k6 documentation · Grafana Labs
- [6]Performance Tweaks · Shopware Developer Documentation
- [7]Caching overview · Adobe Commerce Documentation