← All posts

How to survive viral traffic

By Mukesh Tandi · Web performance

When a wishing site goes viral on a festival, traffic doesn't rise gently — it spikes. Thousands of people open the same page in the same few hours. If your site does real work on every request, it falls over exactly when it matters most.

1. Serve cached HTML, not fresh queries

The single biggest win: make the common page a static, cached response. If every visitor hits full-page cache (or edge cache), your origin barely notices the spike. Dynamic bits can load separately after the cached shell.

2. Push everything to the edge

A CDN serves content from a datacenter near each visitor. That cuts latency and shields your origin from load. Cache aggressively with sensible s-maxage values so most requests never touch your server.

3. Tune the server for concurrency

On the origin, LiteSpeed/Nginx with OPcache and object caching handles far more concurrent users than a default stack. Keep TTFB low and connections short.

4. Test before the spike, not during

Load-test at the traffic you expect on your busiest day. It's far cheaper to find the bottleneck in a test than at 9pm on a festival.

Need help scaling your site? →