This was all running on a single core??
This was all running on a single core??
I/O tends to be the bottleneck (disk IOPS and throughput, network connections, IOPS and throughput). HN only serves text so that's mostly an easy problem.
Just look at New Reddit, it's an insane GraphQL abomination.
No, what changed is the industry devolved into over-reliance on mountains of 'frameworks' and other garbage that no one person fully understands how it all works.
Things have gotten worse, not better.
It's really dumbfounding that most devs fell for it even as raw computing power has gotten drastically cheaper.
I took the bait once and analyzed a $5000 bill. IIRC, it worked out to about the compute provided by an RPi 4. “OK, but what about when your site explodes in popularity?” “I dunno, take the other $4900 and buy more RPis?”
This was many years ago on hardware several times slower than the current generation of servers.
It still puts into perspective what a big pile of dogshit consumer software has become that stuff like this comes as a surprise. Also, the last time I checked, Let's Encrypt also ran on a single system. As did the Diablo 2 server (I love reading about these anecdotes.)
For every incremental change in HW performance, there is an order-of-magnitude regression in SW performance.
Also, re: I/O, the CPU usually also has to handle interrupts there, as well as whatever the application might be doing either that I/O.
Interrupts? Interrupts? We don't need no stinking interrupts! https://docs.kernel.org/networking/napi.html#poll
Spawning new processes for every user is possible but would probabaly be less scalable than even thread-switching.
> Spawning new processes for every user is possible but would probabaly be less scalable than even thread-switching.
I’d just like to note/clarify that there is, in fact, multi-threading happening under the hood when running Node.js. libuv, the underlying library used for creating and managing the event loops, also creates and maintains thread pools that are used for some concurrent and parallelizable tasks. The fact that JavaScript (V8 in the case of Node.js) and the main event loop are single-threaded doesn’t mean that multi-threading isn’t involved. This is a common source of confusion.
Probably everything that's current fits easily in RAM and the older stories are candidates for serving from a static cache.
I wouldn't say this is an astounding technical achievement so much as demonstrating that simplicity can fall out of good taste and resisting groupthink around "best practices".
HN is an island of sanity in a sad world.
(I assume that this update has removed that HN restriction, but haven't bothered to go look to verify this assumption.)