15M web servers on one VM: smoltcp, DPDK, AF_XDP
The article is a long technical post by its author about running 15 million web servers on one VM with 10GB of RAM and one CPU core. The author says they could not get funding, so the project is bootstrapped. It starts with a minimal C web server built on the listen, accept, recv, send and close syscalls[1], which handles around 65k RPS[2].
Running one server per port hits the limit of the port range: the default ip_local_port_range is 32768–60999. Even using ports 1–65535 for both TCP and UDP gives only about 128k servers. The author proposes giving each server its own IP address and uses AnyIP[3] to listen on a whole IPv6 subnet with one ip -6 route command. A separate process per server is also too costly, because one process uses 1.5MB of RAM and 15 million processes would need 20TB.
Instead, the author describes a custom runtime where all guests run in one process, are sandboxed with LFI, and are switched by the author's own scheduler. Each guest needs 16 bytes of saved state, about 220MB for 15 million guests. The author assumes idle connections take no memory, active ones take around 5kb, and 1M connections are active at any moment.
Read the original kapteko.comDiscussion
Discussion
Commenters mostly praise the article as clear, technical and funny, and one says it does not read as if written by AI. Some think the title undersells the story: 10GB of RAM sounds small for a server, and the word 'web' made one reader expect a text about HTTP parsing. One reader found the three-axis graph confusing.
Sources
-
kapteko.com
15M web servers on one VM – smoltcp, DPDK, AF_XDP
OriginalDiscussion · 44Discussion · 11Discussion · 9Discussion · 8Discussion · 1
-
KRGeekNews KO
VM 한 대에서 웹 서버 1,500만 개 실행하기: smoltcp, DPDK, AF_XDP







