1m-go-tcp-server is a benchmark collection for studying Go TCP server designs that can support one million connections. It compares different server architectures instead of presenting a single production framework. The repository includes implementations based on goroutines per connection, single epoll, multiple epoll loops, prefork design, worker pools, and Reactor-style event handling. It also includes client implementations and specialized benchmarks for throughput, latency, I/O-bound workloads, and CPU-bound workloads. The project documents Linux tuning values such as file descriptor limits and TCP settings needed for extreme connection counts. It is most useful for engineers studying high-concurrency networking tradeoffs in Go.
Features
- One-million-connection TCP server benchmarks
- Goroutine-per-connection implementation
- Single and multiple epoll implementations
- Prefork and Reactor-style designs
- I/O-bound and CPU-bound test variants
- Linux tuning guidance for high connection counts