[1]: <https://xyrillian.de/thoughts/posts/latency-matters-aftermat...>
Since we're here, I did a quick grep through today's access log. It appears that your link got me 573 visitors to that article and 56 people clicking through to the other article linked therein.
My mind is blown that anyone writes software for stacks that max out at few hundred requests per second.
Everything I've seen comparing "high level" languages says programmers work around the same efficiency whatever the language. So why isn't everything done in Go, C#, and Java where 100,000 requests/second is trivial?
Even if you don't have much load, isn't the possibiliy of a cat DDoS'ing you by sleeping on someone's F5 key at least slightly concerning?
I swear half these companies that claim their site is "being DDoS'ed!" it's just somebody just running HTTrack to archive an article they like.
I hit SHIFT-CTRL-r to watch the page reload under the network debugger so I could get a snapshot of the total size, which looks to be about 100KB, just eyeballing the sums, so at 10MB/s it should be able to serve around 100 requests/second, which is enough for most websites, even ones getting hugged.
The former worked fast and without any issues, but the latter just groaned and groaned and crashed.
During the transition, a prof asked the class which one to use and all 250 people said in unison “CCnet”.
“ Its main virtues were the stark, no-nonsense interface and the incredibly efficient (although complex) database system that made CCNet ideal for running large numbers of courses with very little by way of server computing resources.”
https://www.utsc.utoronto.ca/technology/what-learning-manage...
One of the reasons were trying to migrate is that Rails servers cost us almost an engineer salary, where our other backend is ~200/month
My AWS S3 skills weren't good enough to figure out the CDN + https. S3 static hosting without those was super simple though.
I speak as a software engineer whose blog has hit the HN frontpage multiple times, and who has optimized my blog to be static & lightweight, just like the author. In my experience, a front-page HN post (in the top 3) leads to 30-40 page hits per second. The page at https://nns.ee/blog/2021/04/01/modem-blog.html weights 44.4 kB transferred (HTML, CSS, images, fonts, etc, all compressed over HTTPS). So this is 11-15 Mbit/s of peak bandwidth, below the maximum throughput the author measured on the Pine phone modem (20.7 Mbit/s).
And the bottleneck is going to be purely network. Not CPU. Not disk. Just serving a small set of files cached in RAM by the pagecache.
$ curl --head 'https://nns.ee/blog/2021/04/01/modem-blog.html'
HTTP/2 200
server: nginx
date: Fri, 02 Apr 2021 13:28:26 GMT
content-type: text/html
content-length: 12937
last-modified: Fri, 02 Apr 2021 09:40:40 GMT
etag: "6066e698-3289"
accept-ranges: bytes% curl -I https://nns.ee/blog/status.html HTTP/2 200 server: nginx date: Fri, 02 Apr 2021 14:48:48 GMT content-type: text/html content-length: 8754 last-modified: Fri, 02 Apr 2021 14:48:31 GMT etag: "60672ebf-2232" accept-ranges: bytes
(FWIW, I think the darkhttpd's website uses... Apache)
No idea if he's caching there, though.
But also, serving static content is more or less a matter of network connection speed. You can cache everything in RAM and write data to a socket very quickly. HTTPS makes things a little wonky because you can’t just sendfile() files directly into a socket but the overhead is still pretty minimal.
setsockopt(sock, SOL_TCP, TCP_ULP, "tls", sizeof("tls"));You pretty much never need that, but many/most sites do it somewhere anyway.
A static site running on a modem should be fine, but there is nothing saying they cant/arent using a CDN too, which would be even better.
It was just used to catch attention.
But with a CDN in front it might likely work out.