Study how to push a Go WebSocket server past OS and runtime limits to extreme connection counts
Learn techniques for reducing per-connection memory overhead in a high-concurrency Go server
Use the Docker test harness to benchmark WebSocket server capacity on your own hardware
Understand the performance bottlenecks that appear when scaling beyond 100k concurrent connections
Requires Docker to spin up the client load-test instances, the code is a learning demo and not maintained for production use.
This repository contains the code from a 2019 conference talk about how to handle one million simultaneous WebSocket connections using the Go programming language. WebSockets are a way for a server and a browser (or other client) to keep a live two-way connection open, rather than the client making one-off requests. The challenge shown here is maintaining an enormous number of these open connections without the server running out of memory or hitting system limits. The code is organized into separate folders, each showing a different approach that solves a specific problem encountered when pushing a server to that scale, whether the limit comes from the operating system, the hardware, or Go's own runtime behavior. A helper script called setup.sh uses Docker to spin up many client instances at once so you can test the server under load. This is a learning resource, not a production library. The author is clear that no new features will be added and the code is not intended for use in real applications. It exists to accompany the talk slides and video, which are linked in the README. If you are curious about how high-performance Go servers handle extreme connection counts, this is a concise working example to study.
← eranyanay on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.