Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you want to survive a spike of traffic from something like HN a simple way to do it is to run your site behind something like Cloudflare and set each page to cache for a short period of time.

Cloudflare implements a dog pile prevention mechanism where if ten simultaneous requests come in for the same page they will make only a single request to the backend, so even just a few seconds of cache time can absorb a huge amount of traffic.

Since my blog rarely updates I use a 15 minute cache time and manually purge the Cloudflare cache when I modify a blog entry. I've survived quite a few high traffic incidents that way.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: