3 ms·
It’s trivial to survive HN traffic with a static site (assuming you know in advance that the site needs to be prepared for HN traffic) - just stick it behind a
by ummonk 4y ago
It’s trivial to survive HN traffic with a static site (assuming you know in advance that the site needs to be prepared for HN traffic) - just stick it behind a CDN.
- pifm_guy 4y agoI found HN front-page to still be less than about 1 user action per second. Ie. Pageload. That means if your site loads fast, you typically won't ever be serving more than a single user at once, so unless you're serving it on a burstable CPU and you run out of burst capacity, you should be fine.
- nicoburns 4y agoYeah, my site which is hosted on fly.io's smallest VM with 256MB RAM and only part of a CPU core was on the HN front page the other day and I was surprised to see that it barely even registered the resource usage: consuming just 50MB RAM with a 0.2 load average. It is a fairly simple webpage, and it's rendered in Rust so it's probably more efficient than most. And perhaps it didn't get as much traffic as other things on the front page, but I was still expecting worse given how much some sites seem to struggle.
- danuker 4y agoI am quite opposed to CDNs. https://danuker.go.ro/how-to-protect-your-personal-data.html https://danuker.go.ro/how-to-protect-your-personal-data.html
- ummonk 4y agoThen use a performant webserver like Nginx and beef up your server hardware.
- nathell 4y agoI host my static sites on a single cheap VPS from Scaleway, and it handles frontpage HN traffic just fine without CDNs.
- jsjohnst 4y ago> It’s trivial to survive HN traffic with a static site It’s fairly trivial to survive HN traffic, full stop. I’ve seen the RPS live from several “#1 on homepage” posts with hundreds of comments (let alone upvotes) and as another commenter stated, it’s at most single digit requests per second. Edit to add: I’m not judging harshly hobby projects for not surviving it, it was a hobby project after all, but that doesn’t change the fact it’s fairly trivial to handle if you set that as a goal.