by vog · 8y ago · 0 comments
Google Cache: https://webcache.googleusercontent.com/search?q=cache:nHJYRo...
<obligatory-rant> I'll never understand why serving static(!) sites is so hard. Are modern blog systems still that bad? HN traffic is far below 100 req/sec (perhaps below 10 req/sec), which should be an absolute no-brainer for any modern webserver. [1] Heck, given a good internet connection, one should be able to run 10 such blogs on a Raspberry Pi and still survive HN. </obligatory-rant>
[1] According to ServerFault, challenges start at 100000 req/sec: https://serverfault.com/q/408546/175421
It's not hard. They're all adding stupid bloat for no good reason.
When my blog was on the frontpage, traffic peaked at 1 Mbit/s (that's megabits, not megabytes) and CPU load peaked at 5% of a single core (and only because that box runs a dozen services in parallel).
Everyone who's blog cannot withstand the HN crowd deserves to have their computer operator's license revoked.
Out of the box nginx on Ubuntu 14.04 on the 1GB Linode (then the second tier) handled it perfectly fine. With no disruption to a teamspeak server that was on the same host at the time.
(BTW you're right, it's a cheap host and quite slow even when it's working. Site runs on Grav (flat-file CMS), which is a lot faster than e.g. WP and ilk (on the same chep host))
It's good to know that there is sane blog software out there, and that it is actually used.
challenges start at 100000 req/sec
Only if you have a well configured cache in front of your cms. If you don't expect any significant traffic, it's perfectly reasonable to serve directly from your cms. And that might be super slow because optimizing a cms for perfomance does not make sense. That should be the job of a cache in front of the cms.Static site generators are a thing now.
There's this hidden assumption here that "the HN crowd" = "a huge amount of visitors". The typical HN crowd for a front-page article will be on the order of 10,000 visitors. That's really not much on the scale of the internet.