Skip to content
Atlas Hoster
Infrastructure

Handling a Viral Traffic Spike Without Crashing Your Site

By The Atlas Hoster team4 min read

A viral article, a TV appearance, a massively shared promotion: in a matter of minutes, your traffic can multiply by ten. If the site is not prepared, it crashes at the worst possible moment. Here is how to absorb a traffic spike without interruption.

Handling a traffic spike: what breaks first

A traffic spike doesn’t magically “crash” a server: it saturates a specific link in the chain. Most often, it is one of these three:

  • The processor, which can no longer keep up when each request triggers a calculation (page generation, database query);
  • The database, which becomes a bottleneck when hundreds of visitors launch the same heavy queries;
  • Bandwidth or the web server, which max out on the number of simultaneous connections (see Disk space and bandwidth).

Identifying the weak link before the spike is already half the job. A load test reveals it in a few minutes.

Page and image caching

Caching is the most cost-effective lever. If a page can be served as-is to all visitors, the server calculates it once and then replicates it: this relieves the processor and the database.

For a spike, caching must be aggressive: cache entire pages, not just fragments, and purge at publication time rather than recalculating on every visit. Images and static files, which often represent the bulk of a page’s weight, should be cached for long periods. For an online store, this speed translates directly into sales: see Speed of an online store.

CDN: offloading traffic

A CDN distributes your content across servers close to visitors, worldwide, and absorbs a large portion of requests. For a viral spike, it is a decisive shock absorber: images, files, and cached pages are served by the CDN, not by your origin server.

The CDN also provides protection: it filters abusive traffic and bots before they reach your infrastructure. On this point, consult DDoS protection: understand and protect yourself.

On-demand added servers

When caching and CDN are no longer sufficient, it is necessary to add computing power. Two approaches:

  • Resizing a single server (increasing CPU and RAM): simple, but limited by the machine’s capacity and the time required for the operation.
  • Adding servers behind a load balancer: multiple identical web servers share the traffic; you add one to absorb a spike, then remove it afterwards.

The second approach is that of high-availability architectures. Atlas Hoster designs and deploys redundant architectures — load balancer, multiple web servers, cache, replicated database, CDN — and adds servers on demand for a spike. See the high-availability offer.

Load testing before the event

You don’t guess a site’s capacity under load: you measure it. A load test simulates hundreds or thousands of simultaneous visitors and shows what breaks first — response time, error rate, database, or processor.

Atlas Hoster performs these tests using tools such as k6 or Locust before a launch or commercial campaign, and fixes what limits performance: caching, queries, sizing. The complete method is described in Load testing: validating your site before a traffic spike.

Monitoring and real-time response

During a spike, you need to see what is happening, not discover it afterwards. Continuous monitoring — processor load, memory, disk, response time — allows you to react before a crash: adding a server, extending the cache, or removing a server that is no longer responding.

This is the difference between an infrastructure that “holds” and an infrastructure held together by a team that monitors it. For news sites and media outlets, this topic is detailed in Hosting a high-traffic news or media site. Monitoring also helps distinguish a legitimate spike from an attack: a wave of requests could be either, and the application firewall filters them. To block a suspicious IP address or domain, consult Blocking an IP address or domain. See also our article on DDoS protection.

Preparing a commercial campaign

A spike is not endured: it is prepared. If you know that a campaign will generate traffic — promotion, launch, media appearance — here is the procedure:

  1. Estimate the expected peak: how many peak visitors, on which pages.
  2. Load test: simulate this peak and fix what breaks, before the event.
  3. Cache: landing pages and images must be served by the cache and the CDN.
  4. Plan for margin: add a server or increase resources in advance, not during the spike.
  5. Monitor: track load in real time and define who intervenes if a threshold is crossed.

The goal is not to predict everything, but not to be caught off guard: a prepared site absorbs a traffic spike without anyone noticing. This is exactly Atlas Hoster’s method for stores, media, and applications: design, deployment, load testing, then operation with on-call support. The details of the approach are presented on the high-availability page. For news sites, see also Hosting a high-traffic news or media site.

FAQ

How many simultaneous visitors can a standard site handle?

It depends entirely on the site, its code, and its server. There is no universal figure: this is precisely what a load test measures for your specific case.

Is a CDN enough to handle a spike?

For largely static content, often yes. As soon as each visit triggers calculation or database access (cart, search, account), you also need application caching and computing power.

Should you permanently oversize for a rare spike?

No. It is better to have an architecture that scales on demand, even if it means adding and then removing servers, rather than paying all year for a spike lasting a few hours.

All posts

A question about your infrastructure?

Tell us about your project: an engineer answers and suggests the offer that fits it.

Handling a Viral Traffic Spike Without Crashing Your Site · Atlas Hoster