Think Build Implement Repeat
London, UK +44 7367 067226
WhatsApp FOLLOW f in X
  1. Home
  2. Blog
  3. Every Time We Run a Big Promotion, Our Website Falls Over. How Do We Make It Cope With Traffic Spikes?
Problems We Solve

Every Time We Run a Big Promotion, Our Website Falls Over. How Do We Make It Cope With Traffic Spikes?

Site crashes during traffic spikes just when a sale or campaign lands? Why it happens and how SpiderHunts finds the bottleneck and prepares the site for peaks.

Updated 3 min readBy SpiderHunts Technologies

Free estimateNo obligation

Get a free estimate

Tell us what you need. A senior engineer reads every enquiry.

Takes under a minute. We never share your details.

  • Free consultation
  • No commitment
  • NDA on request

Prefer to talk? Book a free 30-minute call →

Quick answer — TL;DR

Sites crash during traffic spikes because one part (the database, the application server, a checkout call or an uncached page) runs out of room first. SpiderHunts load-tests to find that bottleneck, adds caching and a CDN for pages that can be cached, fixes slow queries, sets up scaling that responds to load, and adds a fallback like a queue page so peaks slow things down gracefully rather than taking the site down.

The busiest hour of the year, and an error page

The sale email goes out. The influencer posts. The product gets mentioned on television. Within minutes the site slows to a crawl, then starts showing errors. The team refreshes the hosting dashboard, someone restarts the server, it comes back briefly and falls over again. By the time it recovers, the peak has passed.

The marketing worked. The site did not. And the same thing happened at the last big campaign.

Why sites fall over under load

A site under a sudden spike usually fails at one weakest point, and everything behind it queues up and times out.

BottleneckWhat happens under load
Uncached pagesEvery visitor makes the server build the page from scratch
DatabaseSlow queries that were tolerable become a queue that never clears
Fixed server sizeOne server with no way to add capacity when load rises
Sessions and cartsStored in a way that stops extra servers being added
Third-party callsA slow payment, stock or shipping API holds up every request
Heavy pagesLarge images and scripts multiply the load on every visit

The detail that catches people is that the home page is often fine, because it is cached. It is the category, search, basket and checkout pages, the ones that matter during a sale, that cannot be cached and fall over first.

What a crash at peak costs

Sales you would have made in the busiest hours. Advertising and campaign spend that sent people to an error page. Customers who tried, failed and bought elsewhere. And a team that dreads promotions, which leads to marketing being held back so the site survives.

How we prepare a site for peaks

  1. Load-test first. Using tools such as k6 or JMeter, we simulate realistic traffic on a staging copy, including browsing, searching and checking out, and watch where it breaks.
  2. Put a CDN in front. Services such as Cloudflare, Amazon CloudFront or Azure Front Door serve images, scripts and cacheable pages from the edge, so most requests never reach your server.
  3. Cache what can be cached, including pages for anonymous visitors and expensive query results, with sensible rules for refreshing them.
  4. Fix the slow queries and code paths the load test exposes, particularly on search, basket and checkout.
  5. Make the application able to scale out: sessions and carts in a shared store such as Redis, and servers or containers that can be added automatically when load rises, using autoscaling on AWS or Azure.
  6. Protect against slow third parties with timeouts, retries with limits, and queues for work that does not need to happen during the request.
  7. Plan for beyond capacity. A virtual waiting room or a lightweight holding page for extreme peaks is better than a crash for everyone.
  8. Run a checklist before known events: scale up in advance, freeze deployments and have named people watching the dashboards.

For platforms like Shopify, much of this is handled by the platform, and the bottlenecks move to apps, themes and integrations. We look at those instead.

When the next campaign lands

You know from testing roughly how much traffic the site can handle and where it will strain first. Most traffic is served from the CDN and cache. The servers scale out when load rises and back down afterwards. If demand exceeds everything, visitors see a queue rather than an error. And marketing can plan campaigns without asking whether the site will survive.

Recognise the pattern?

  • Your site has slowed down or crashed during a sale, launch or campaign.
  • The fix during an incident is restarting the server.
  • Your site runs on a single server with no automatic scaling.
  • You have never load-tested the site.
  • Marketing holds back promotions because of worries about the site.

FAQ

Frequently asked questions

The questions readers ask us after this guide.

Still have a question?

Ask us directly — a senior engineer will get back to you.

Ask about your project

Should we just buy a bigger server?

It can buy some room, but it does not fix uncached pages or slow queries, and it costs more all year for a few busy hours. Finding the real bottleneck usually matters more.

Is load testing risky for our live site?

We load-test a staging copy, not the live site, unless there is a specific reason and an agreed window.

Does a CDN help if most of our pages are personalised?

It still takes images, scripts and static assets off your server, which is a large share of the load. Personalised parts can often be loaded separately.

What do you need from us?

Access to hosting and code, analytics from past peaks if you have them, and dates of upcoming events.

Keep reading

More on Problems We Solve

Start here

Site falling over when it matters most?

Tell us what your site runs on, where it is hosted and what kind of peaks you expect. We will look for the bottleneck and suggest what to change, and if a caching change is all it needs, we will say so.

  1. You tell us what you needTwo minutes on the form, or a message on WhatsApp.
  2. A senior engineer reviews itAnd comes back with questions, a realistic range and an honest view on fit.
  3. Free 30-minute scoping callWe talk through scope, options and a realistic estimate — with no obligation.
Free estimateNo obligation

Talk to someone who builds this

Send a short brief and we will come back with an honest view and a realistic range.

Takes under a minute. We never share your details.

  • Free consultation
  • No commitment
  • NDA on request

Prefer to talk? Book a free 30-minute call →