How a Silent Linux Kernel Bug Nearly Derailed a 1 Million Connection Chat Server
A engineering team scaling a Java-based chat platform to 1 million concurrent connections discovered that connection failures around the 800,000 mark were caused by a full nf_conntrack kernel table silently dropping packets with no application-level errors or alerts. The only clue was a single line buried in dmesg that no monitoring system was watching. To resolve the issue and reach their target scale, the team tuned several Linux kernel parameters including file descriptor limits, TCP send and receive buffers, and interface queue lengths. Buffer sizes were calculated using the bandwidth-delay product formula, with a 1 Gbps link and 130ms RTT yielding a target of roughly 17.5 MB per buffer. The experience highlighted that beyond a certain connection scale, kernel-level subsystems must be treated as part of the application's failure surface and monitored accordingly.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in