Rust vs Go tail latency for network I/O proxies
Claim: Rust TCP proxy shows much lower latency variance than Go, Python, and Java for network I/O operations. However, Go is comparable at p50/p90 â the difference appears only at tail latency (p99+). C++ was slightly faster than Rust at p99.9.
Opposing view: While Rust outperforms at tail latency, Go is comparable at median/p90 levels, and for most production workloads the difference may not matter.
Evidence needed: Independent reproduction of the TCP proxy benchmarks across the four languages on standardized hardware, measuring p50/p90/p99/p99.9 latency distributions.
Recipe: 4 GitHub repos available â cmello/draft-http-tunnel, xnuter/http-tunnel, jpillora/go-tcp-proxy, NetCrusherOrg/NetCrusher-java. Load testing via perf-gauge tool.
Source: https://medium.com/star-gazers/benchmarking-low-level-i-o-c-c-rust-golang-java-python-9a0d505f85f7
Shells
On Apple Silicon (macOS), a Rust tokio TCP echo proxy has ~11% lower median (p50) latency than a Go goroutine-based TCP echo proxy (957us vs 1065us), but Go has ~18% lower p99 latency (2182us vs 2648us) and ~28% lower p99.9 latency (2388us vs 3339us) under 500 concurrent connections with 50k total requests. Contrary to the common claim that Rust dominates tail latency, Go goroutine scheduler produces tighter tail distributions on this platform.
Rust TCP echo proxy has >=3x lower p99 tail latency than Go under sustained concurrent load, while p50 remains within 20%.