10 ms·
Even running a site that front-pages HN doesn’t actually require that much infrastructure. Peak traffic is a few hundred RPS. Or at least it was when I was stil
by wyager 5y ago
Even running a site that front-pages HN doesn’t actually require that much infrastructure. Peak traffic is a few hundred RPS. Or at least it was when I was still using google analytics. Might be more now. But in any case, if you use fast web software you can serve dynamic content to an HN ddos off a $5/mo VPS. The problem is a lot of people will be like “well my website doesn’t need to be fast because it’s not popular, so I’ll write it in python/node/ruby and make it dynamic” and then their server falls over at 50 RPS on commodity hardware, when if they’d written it with a popular haskell/rust/go/whatever framework, it could handle 100x that much traffic.
If you hope that your writing ever reaches a large audience, you need to be able to serve a large audience! It doesn’t take that much extra work to be ready for it.
- account42 5y agoI think your getting downvoted because of the python/node/ruby vs. haskell/rust/go comment and perhaps rightly so. For some things this will certainly matter, but for a public content like this, especially the landing page, the real problem is that a flood of visitors should not all be hitting any dynamic backend in the first place - they are all going to see exactly the same page anyway. That means either making it completely static (would mean removing the sidebar in this case) or having a modest (micro-)caching setup so that most requests don't hit the backend. With nginx (which is what widelands.org seems to be using) this is only a couple of lines of configuration, no need to change the dynamic backend at all.
- wyager 5y agoNeeding to use a reverse proxy like nginx in the first place is honestly insane, and the fact that many web devs tolerate it is a sign of totally whack priorities. You shouldn’t need a reverse proxy to serve your website, and you should be able to serve dynamic content to hundreds or thousands of people per second. Literally all you have to do for 90% of websites is not use some slow uncompiled backend that shits the bed at 50 RPS. Pointing this out pisses people off because they hate the idea that bogosort.js isn’t actually a good web backend and they might have to learn something else if they want to build a good website instead of trying to paper over perf issues with a massive reverse proxy with 35,000 config options and just as many CVEs.
- 10000truths 5y agoPeople really seem to underestimate just how much a CPU can handle when it’s not bogged down by the abstraction of high level languages. You can easily easily serve over 1000 static pages per second per core with nginx on commodity hardware over TLS, and over 10000 pages/second/core if you’re using a server-grade CPU like a Xeon or Epyc.
- wyager 5y agoI don’t think “high level” is even the problem. Haskell is extremely high-level and yet it’s very fast, on account of having an extremely OP compiler. In this case it seems to just be the frameworks on top of non-compiled languages that are slow.