15 Million Web Servers on One VM: Why the Author Is Exploring smoltcp and DPDK

The author of a Kapteko post asks whether 15 million simple web servers could run on a VM with 10 GB of memory and one CPU core. The article does not confirm that the target was reached.

· 5 min read · 4 comments

On November 19, 2026, the author of a post on Kapteko examined a question: could 15 million simple web servers run on a VM with 10 GB of memory and one CPU core? The article covers Linux limits on ports, processes, and sockets, then considers a custom runtime and the smoltcp TCP/IP stack. The provided text does not confirm that the stated goal was achieved.

Ports and processes: the first limits

The starting point is a minimal C server. It accepts a TCP connection, reads the request, returns HTTP/1.0 200 OK and the two characters OK, then closes the connection. The author measured roughly 65,000 requests per second for this program. But a single handler’s speed does not mean millions of copies will fit on one machine.

The first attempt to run many servers hit a port limit. When given port 0, Linux chooses an available port from a range that, in the example, runs from 32768 to 60999. Even expanding that range cannot provide 15 million ports on one IP address: a port number is 16 bits wide. Because a listening server is identified by the combination of protocol, IP address, and port, additional addresses are needed to create more endpoints.

The author suggests using AnyIP: configure a local route for an entire subnet and assign its addresses to the servers. The article includes a command for an IPv6 /64 subnet and mentions a similar option for IPv4. This gets around the addressing limit, but not the memory cost. An attempt to start 15 million separate processes ran out of memory. By the author’s estimate, one server uses about 1.5 MB, so all of them would need roughly 20 TB.

Why a scheduler alone is not enough

The next idea is to put the handlers in a single process and switch between them with a custom scheduler. To suspend a simple handler, the author budgets 16 bytes of state: the address at which execution should resume and two file descriptors. For 15 million instances, that comes to about 220 MB. A preliminary estimate allocates another 5 GB for one million active connections; the remaining listening sockets were assumed to require no memory.

That last assumption did not survive testing. Even calling socket() without subsequently accepting connections creates structures in the kernel. In the estimate given, one TCP socket takes up about 3.3 KB. With millions of sockets, eliminating separate processes is not enough: the scheduler manages handlers, but it does not remove the kernel’s socket overhead.

The author therefore considers smoltcp, a TCP/IP stack written in Rust that does not require heap allocation. This means working with networking at a different level, but the stack still needs a way to receive and send data. The author provides sample code using TUN at the IP layer or TAP at the Ethernet layer. DPDK is described as an option for working directly with Ethernet frames while bypassing the kernel.

The limits of the result matter here. The article includes estimates, tests that ran out of memory, and an example network loop for TUN/TAP, but no confirmed run of 15 million servers on the specified VM. AF_XDP appears in the original article’s title, but its role is not explained in the provided text. There is no performance comparison of the approaches listed, either.

What this means for websites and teams

Website owners should not treat the number of servers on a VM as a measure of page speed. The test handler always returns the same short response. The article contains no measurements for application logic, a database, or the content of a production website, so its test result cannot be applied to them.

For developers, the sequence of checks is useful. The author separates the shortage of addresses from the cost of processes, then identifies overhead that remains even with a shared runtime. Before discussing a replacement network stack, a team should find out which resource actually limits its own service. This is no longer a matter of changing one setting: it changes how network traffic is handled.

My view: the cost of controlling the network

What interests me more than the number in the headline is the mistaken assumption about listening sockets. The estimate of 16 bytes per handler looked convincing until testing revealed the kernel overhead. That kind of turn is useful in performance work: a model helps point you in a direction, but measurement determines whether it holds up under real load.

I would read this as an exploration of an approach’s limits, not a guide to speeding up an ordinary website. A custom scheduler and direct work with the network stack offer more control, but they also bring more responsibility for that part of the system. For a small website, I think that cost is usually excessive. If the task really does call for millions of separate endpoints, though, it can be weighed against the limits already identified in the standard approach.

Sources

Where the news comes from. The text is a retelling in the author’s own words; the facts come from the source, the opinion is the author’s.

  1. 15M web servers on one VM – smoltcp, DPDK, AF_XDP kapteko.com

About the author

Pavel Albrecht

Senior backend developer

I design server-side systems and help teams tackle performance issues. In long discussions, I try to show not just my recommendation, but also the cost of each option.

All posts by the author

Leave a comment

Not published. We’ll send a link to confirm your comment.

No links or ads. Your first comment is published after review. By sending a comment you agree to the privacy notice.

  1. I’ve hit the same kind of ceiling with connection-heavy services: adding workers didn’t help once the bottleneck was per-connection state and port allocation. For this setup, I’d want to see whether “15 million servers” means 15 million listening endpoints or 15 million concurrent connections; those are very different workloads.

    1. That distinction is crucial: the article’s port-allocation example concerns listening endpoints, while the minimal server’s request rate says little about the cost of keeping millions of connections open. I’d want the author to define the workload before treating a custom runtime or smoltcp as a solution.

    2. That’s the key distinction. In the post, the port-range limit appears when each server is treated as its own listener, but 15 million concurrent connections would shift the problem toward per-connection state, file descriptors, and memory. A custom runtime or smoltcp may reduce some of that overhead, but it doesn’t make the two workloads equivalent. Which interpretation did you have in mind?

  2. The port and process limits are useful early warnings, but I’d want to see the workload definition before treating “15 million servers” as a meaningful capacity target. With smoltcp, are you planning to measure end-to-end HTTP behavior under realistic connection churn and slow clients, or mainly the cost of keeping idle TCP state around?