News for hackers. Stuff that matters.
Re:I Setup My Own Personal CDN Using Cloudflare and S3 by simonw on Friday October 16, 2020 @12:37PM (#24802466)
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.

There are no comments on this comment yet.