Go WebSocket Library Comparison
Libraries Benchmarked:
- https://github.com/gorilla/websocket
- https://github.com/lxzan/gws
- https://github.com/gobwas/ws
- https://github.com/lesismal/nbio
- https://github.com/coder/websocket
Latest Benchmark Results:
Last Updated: Mon, 30 Nov 2026 12:19:49 UTC
| Library | Version | Throughput (MB/s) | Avg Latency (ms) |
|---|---|---|---|
| coder/websocket | v1.8.15 | 205.16 | 37.81 |
| gobwas/ws | v1.5.0 | 253.03 | 30.70 |
| gorilla/websocket | v1.5.3 | 570.18 | 13.57 |
| lesismal/nbio | v1.7.2 | 252.72 | 30.68 |
| lxzan/gws | v1.10.2 | 727.06 | 10.71 |
Performance Over Time: Throughput (MB/s):
The Depot migration PR moves measurement from GitHub-hosted ubuntu-latest to depot-ubuntu-24.04. Results recorded before and after that migration use different machines. Do not interpret a change across that boundary as a library improvement or regression. The weekly/manual publisher checks out current main; queued refreshes coalesce, and an older rerun cannot cancel an active measurement. Depot runtime and billing savings have not been measured.
