Achieving 5M persistent connections with Project Loom virtual threads
A bit of a digression, but I’d love to see how much further  one could go with a memory-optimized userland TCP stack, and storing the send and receive buffers on disk.<p>A TCP connection state machine consists of a few variables to keep track of sequence numbers and congestion control parameters (no more than 100-200 bytes total), plus the space for send&#x2F;receive buffers.<p>A 4 TB SSD would fit ~125 million 16-KB buffer pairs, and 125 million 256-byte structs would take up only 32 GB of memory. In theory, handling 100 million simultaneous connections on a single machine is totally doable. Of course, the per-connection throughput would be complete doodoo even with the best NICs, but it would still be a monumental yet achievable milestone.