4 ms·
Even my dedicated Apache server threw errors for static pages every now and then, when serving gigabytes per hour.
by danuker 4y ago
Even my dedicated Apache server threw errors for static pages every now and then, when serving gigabytes per hour.
- ummonk 4y agoIt’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.
- nicoburns 4y agoIsn't Apache infamously slow? If you're serving a lot of traffic I'd consider switching to a faster server (nginx or similar).
- nomel 4y ago> If you're serving a lot of traffic I'd consider switching to a faster server I don't think anyone with a small personal site should spend too much time planning for that single, improbable, day when traffic might increase by several orders of magnitude. With most hosts I've had, that type of increase would just trigger DDOS protection and/or take down the site with its itty bitty quota limits.
- julian_sark 4y ago1. host website with AWS 2. Get featured on HN 3. Suddenly Jeff can hire all the folks back he's laying off, from the bandwidth proceeds.