15M web servers on one VM – smoltcp, DPDK, AF_XDP
175 points by fessguid 6 hours ago | 23 comments

101008 11 minutes ago
Great article from the technical aspect, but I also enjoyed the humour a lot. I chuckled with the GB joke, and including the Wolfram screenshot reminded me of the blogs from the ~2005 era, that allowed themselves to include this type of humor.

It was like in the 2000s, blogs wanted to share informatin but also be funny, something similar to a talk in a event? Later they only focused on SEO, so they optimized every word and paragraph, removing jokes, etc. I remember noticing this with the Digital Ocean docs, that ranked 1 for every tutorial in how to install stuff on servers.

Anyway, good times! I miss them.

reply
LetMeLogin 5 hours ago
That was really nice read, finally an article that is easy to read, simple but super technical, and most importantly not written by AI.
reply
pi-rat 5 hours ago
Really interesting and love the humor. Made me chuckle over morning coffee multiple times.

Finding something today that makes you go “i want to subscribe to more of this”, is rare.

reply
Nux 3 hours ago
Yeah, liked the About Me page, too.
reply
cowlevel 56 minutes ago
Cutting through abstraction and getting to the heart of what you actually want the computer to do is evidently the key to high performance programming.

You can go much lower. The goal was set at "15 million web servers" which is dependent on the definition of "a web server" to include some implementation details. From the client perspective it actually means 15 million IP/port combinations that respond to HTTP - which you can do all in one go with an appropriate wildcard selector (such as with iptables transparent proxy)

reply
gonzus 57 minutes ago
Came back to HN simply to say, what a fantastic article! Interesting, entertaining, it even had me laughing out loud at points. Great job!
reply
athrowaway3z 4 hours ago
I suggest removing the 'web' and just title it 15M servers on one VM.

Seeing 'web', together with its first few sections, made me initially think about http parsing/switching and almost made me stop reading.

reply
ac2u 18 minutes ago
Hook articles like this directly to my veins
reply
kvirani 5 hours ago
It's a breath of fresh air to read an article this well written. I learned, I laughed, I even relearned.
reply
3abiton 4 hours ago
> The goal is to run 15 million web servers on one VM with 10GB of RAM and 1 CPU core.

The title is underselling the story. I thought the webserver would've been some extremely beefy server, but no. It's 10GB of RAM. That's a basic M4 mac mini territory (and even that one is much more beefier than OP's server)

reply
com 5 hours ago
It’s so easy to forget how much power we have in our systems and how it’s possible to strip abstractions away to get at that power.

Love the humour and simplicity!

reply
magahugu 4 hours ago
I don't understand the 3 axis graph with just 2 dimensions. Love the humor and technical depth!
reply
ptejax 3 hours ago
One of the vertical axis is charted using a dotted line and other with a continuous line
reply
edumucelli 5 hours ago
Loved it, technical, funny, easy to read. It has been a long time I have not seen only like this.
reply
mrheosuper 4 hours ago
With the trend of moving everything to userland, maybe Linux finally become a microkernel.
reply
bewo001 49 minutes ago
with ebpf, I'd argue it's getting closer to an exokernel (https://sites.cs.ucsb.edu/~rich/class/cs270/papers/dawson-ex...)

micro kernel: a bit like microservices; eth process talks to ip process, ip process talks to tcp process, tcp process talks to web server; multiple IPCs per packet/PDU, rather slow, single crashing process can still take out everything.

exo kernel: web server asks kernel to get packets matching some filter, kernel passes packets matching the filter to web server, web server uses a eth/ip/tcp library to process the packets;

reply
cowlevel 16 minutes ago
My favourite one-sentence explanation of an exokernel was from the explanation of a web server called Cheetah running on a kernel called XOK: to save time, the web server stores preformatted TCP packets on disk.

This one sentence is such a profound layering violation that it changes your perspective on the possible ways to write programs.

reply
tempfile 53 minutes ago
> Ten Great Britains divided by 15 million gives around half of kilo britain.

I audibly exhaled from my nose, thank you.

reply
peter_d_sherman 54 minutes ago
An excellent resource optimization article, i.e., given a limited or deeply constrained amount of X, can I get a specific amount of Y, given that the traditional relationship between X and Y is constrained by some set of criteria previously thought to be fixed in nature -- well, let's see if we can re-evaluate those criteria and somehow unconstrain it...

In this case, the constraint is "one VM with 10GB of RAM and 1 CPU core", which would definitely be able to run a single web server fairly well, and probably could run tens of them fairly well, as well.

But, when we get up to hundreds of them simultaneously, thousands of them, tens of thousands of them, well, the associated resource constraint problems just seem to compound at every level...

But let's not let that stop us, let's "go for broke" -- and attempt 15 Million!

It's an excellent thought and engineering exercise...

Anyway, the article is a great read. Worth reading by anyone into optimization of computing resources, and definitely worth re-reading in the future.

Related:

The C10K Problem (1999):

https://en.wikipedia.org/wiki/C10k_problem

https://www.kegel.com/c10k.html

reply
publlus_enigma 58 minutes ago
This was not what I was expecting - in a good way. Well written, funny, and devoid of AI slop.
reply
elendilm 4 hours ago
Wonderful article.

I was thinking for the last couple of days to have 10M+ app connections on one laptop as an extreme cost optimization excercise. Great timing.

reply
ZiiS 5 hours ago
Wait till he hears about the HOST header.
reply
ozozozd 3 hours ago
They mentioned it. Referred to it as “virtual hosting.”
reply
MalgorzataKowal 3 hours ago
[flagged]
reply
kburman 2 hours ago
[flagged]
reply
shipitx 3 hours ago
[flagged]
reply
Fivekoto 3 hours ago
[flagged]
reply