What Happens When Your Site Goes Viral (Technically)
Going viral is one of the few scenarios where success can kill your product. The traffic arrives in minutes, not hours, and most origins aren't sized for it.
The anatomy of a viral spike
A link hits a large platform. Thousands of people click it within minutes. Your CDN absorbs the first wave if the content is cached. If it isn't, or if users request dynamic content, every request hits origin. Connection pools fill up. Database query queues back up. Response times climb. Eventually the server starts refusing connections.
What breaks first
- Database connection pools: the most common bottleneck. A spike of concurrent users overwhelms the pool before CPU or memory is a problem.
- Uncached dynamic content: personalized or real-time pages can't be served from cache and hit origin every time.
- Third-party integrations: analytics, payment providers, and CRM hooks all add latency that compounds under load.
- TLS handshake capacity: new connections require crypto computation; a flood of new visitors stresses this.
How to prepare
Cache aggressively at the edge. Use a queue or rate limiter on dynamic endpoints. Set a sensible concurrency cap so overload degrades gracefully instead of crashing hard. A reverse proxy with rate limiting at the edge gives you a circuit breaker between the internet and your origin.