The piece uses a deliberately absurd goal - hosting 15 million web servers on one virtual machine with 10 GB of RAM and one CPU core - to explain the constraints behind network services. A conventional server handles requests through listening sockets and calls such as accept, receive, and send, but scaling separate processes quickly hits limits: ephemeral ports offer only tens of thousands of choices, and even assigning each server a distinct IP address cannot make millions of ordinary processes affordable. The proposed workaround is to use a large address range, such as an IPv6 subnet, and run every server as a lightweight guest inside one custom runtime rather than as its own operating-system process.
The runtime would preserve only about 16 bytes of scheduling state per guest, or roughly 220 MB for 15 million guests. The calculation assumes 14 million idle connections consume no memory and that one million active connections use about 5 KB each, bringing estimated usage to around 5 GB. To manage networking efficiently, the discussion introduces smoltcp, a small TCP/IP stack that can use kernel-provided TUN or TAP interfaces. For lower latency, DPDK bypasses the kernel and accesses network hardware directly, avoiding syscall and interrupt overhead at the cost of dedicating a CPU core and taking exclusive control of the network card. AF_XDP is named as another, newer networking option, though the available text ends before explaining it. The grand promise is comic; the engineering discussion centers on reducing per-server overhead.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.