tokio-ws
Engine · Rust · engine: tokio
Hand-rolled WebSocket echo server on raw tokio — no WebSocket library. A current-thread runtime per core with SO_REUSEPORT sharding, a from-scratch RFC 6455 handshake (hand-written SHA-1 + base64) and a manual frame parser/masking + echo write path.
Achievements
🥈 3 Silver. Top three of a field, taken in this entry's own league: the family composite, the same composite among entries written in the same language, and each test profile it is scored on. Every field is the one the badges publish, so a medal and a badge always say the same thing. How medals are awarded.
| Medal | Award | Field | Rank |
|---|---|---|---|
| 🥈 Silver | Within its language | Rust · WebSocket | 2 of 3 |
| 🥈 Silver | Test profile | WebSocket · Echo | 2 of 9 |
| 🥈 Silver | Test profile | WebSocket · Echo Pipelined | 2 of 8 |
Composite rank
Each profile of a family is worth 100 to the entry that leads it, and the composite is the sum over the family, less 2.5% for each of routing, middleware, request and response the entry does not do for you - its completeness factor, which the WebSocket and gRPC families do not carry. The field is this entry's own league: engines and reverse proxies are scored apart from frameworks. How it works.
| Family | Rank | Composite |
|---|---|---|
| WebSocket | 4 of 9 | 1986 |
Every result
Alpha Round, 6 runs. Requests per second is the best of three; latency, CPU and memory come from that run.
| Category | Profile | Conns | Req/sec | Avg | p99 | CPU | Memory |
|---|---|---|---|---|---|---|---|
| WebSocket | Echo | 512 | 4,352,944 | 117us | 213us | 6332.2% | 43MiB |
| WebSocket | Echo | 4,096 | 4,433,246 | 923us | 1.19ms | 6228.7% | 176MiB |
| WebSocket | Echo | 16,384 | 4,143,535 | 3.93ms | 4.67ms | 6399.5% | 590MiB |
| WebSocket | Echo Pipelined | 512 | 65,856,262 | 123us | 238us | 6216.1% | 42MiB |
| WebSocket | Echo Pipelined | 4,096 | 66,930,970 | 978us | 1.32ms | 6240.6% | 173MiB |
| WebSocket | Echo Pipelined | 16,384 | 61,865,334 | 4.22ms | 5.03ms | 6397.0% | 592MiB |
Compared with
The Rust entries around tokio-ws on the WebSocket composite, and the one leading them. The last column shows every profile side by side.
| Entry | Composite | vs tokio-ws | |
|---|---|---|---|
| wtx | 2448 | +23% | head to head |
| tokio-websockets | 2256 | +14% | head to head |
| actix | 1776 | -11% | head to head |
| tokio-uring-ws | 1681 | -15% | head to head |
Compare tokio-ws with any Rust entry · Compare tokio-ws with any entry, in any language · Every Rust entry, ranked
Results updated · How the benchmark is run · The machine · Add or fix an entry