Hacker News new | ask | show | jobs
by lukes386 4703 days ago
Even easier would be to setup cloudflare in front of the site.

All you have to do is set the cache control headers for your landing page to something like "max-age=300, public". That way cloudflare's servers will eat the vast majority of your requests, but no one will see content older than a few minutes.

We got HN'd the other day and this kept our median response time around 25ms, even for our slow rails app.

Of course you have to make sure your landing page is publicly cacheable for this to work (i.e. no user specific data), but that's a small price to pay for a drastic reduction in the amount of traffic you need to serve.

1 comments

+1 for Cloudflare. I use them for my site and responsiveness has never been better. Their service is truly excellent.
I second that, Cloudflare is the way to go - extremely reliable.
As a CDN for static content Cloudflare is an easy win.