uWebZockets
Experimental · Zig · engine: libxev · standard configuration · completeness 4/4
Zero-allocation, shared-nothing Zig 0.16 framework: a typed Request/Response API over HTTP/1.1, HTTP/2, HTTP/3, WebSocket and JSON-RPC, served from bounded startup slabs. Each cluster worker runs its own libxev loop; the kernel schedules workers across the benchmark's assigned logical CPUs. BoringSSL, lsquic and libdeflate are compiled in. Standard configuration, no tuning.
Achievements
🥇 3 Gold · 🥈 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 |
|---|---|---|---|
| 🥇 Gold | Test profile | Connection · Baseline | 1 of 7 |
| 🥇 Gold | Test profile | Connection · Short-lived | 1 of 7 |
| 🥇 Gold | Test profile | WebSocket · Echo | 1 of 7 |
| 🥈 Silver | Test profile | Efficiency · Latency-1M | 2 of 5 |
| 🥈 Silver | Test profile | HTTP/2 · JSON (h2c) | 2 of 4 |
| 🥈 Silver | Test profile | WebSocket · Echo Short-lived | 2 of 7 |
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 |
|---|---|---|
| HTTP/1.1 | 4 of 7 | 4030 |
| HTTP/2 | 4 of 4 | 492 |
| HTTP/3 | 3 of 3 | 0 |
| WebSocket | 5 of 7 | 2085 |
Every result
Alpha Round, 23 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 |
|---|---|---|---|---|---|---|---|
| Connection | Baseline | 4,096 | 3,736,192 | 1.10ms | 1.86ms | 6302.8% | 1.3GiB |
| Connection | Pipelined | 4,096 | 5,043,188 | 13.02ms | 18.20ms | 6145.6% | 1.3GiB |
| Connection | Short-lived | 4,096 | 2,613,434 | 1.46ms | 10.60ms | 5900.5% | 1.3GiB |
| Efficiency | Latency-10K | 1,024 | 9,979 | 74.5us | 111.0us | 23.5% | 1.2GiB |
| Efficiency | Latency-1M | 1,024 | 997,885 | 101.4us | 179.0us | 2468.0% | 1.2GiB |
| Efficiency | Latency-500K/8 | 1,024 | 474,534 | 468066.4us | 2835456.0us | 817.3% | 908MiB |
| Workload | JSON Comp | 4,096 | 16,639 | 180.80ms | 3.58s | 621.3% | 1.2GiB |
| Workload | JSON Comp | 16,384 | 16,486 | 183.93ms | 3.73s | 629.3% | 1.2GiB |
| Workload | JSON TLS | 4,096 | 26,172 | 18.70ms | 84.96ms | 100.5% | 1.2GiB |
| HTTP/2 | Baseline (h2c) | 256 | 2,442,365 | 956us | 38.79ms | 6181.6% | 1.2GiB |
| HTTP/2 | Baseline (h2c) | 1,024 | 2,526,635 | 4.11ms | 247.93ms | 6501.6% | 1.2GiB |
| HTTP/2 | Baseline (h2c) | 4,096 | 2,483,817 | 31.74ms | 884.28ms | 6220.8% | 1.5GiB |
| HTTP/2 | JSON (h2c) | 1,024 | 1,401,010 | 5.93ms | 153.89ms | 6579.4% | 1.3GiB |
| HTTP/2 | JSON (h2c) | 4,096 | 1,339,096 | 36.19ms | 1.82s | 6316.8% | 1.7GiB |
| HTTP/3 | Baseline | 64 | 1,771 | 7.29ms | 54.81ms | 40.6% | 1.2GiB |
| WebSocket | Echo | 512 | 3,899,512 | 130us | 295us | 6407.3% | 1.2GiB |
| WebSocket | Echo | 4,096 | 4,311,546 | 949us | 1.49ms | 6121.7% | 1.3GiB |
| WebSocket | Echo | 16,384 | 3,998,696 | 4.04ms | 5.90ms | 6424.7% | 1.7GiB |
| WebSocket | Echo Pipelined | 512 | 5,749,165 | 1.42ms | 2.51ms | 6407.5% | 1.2GiB |
| WebSocket | Echo Pipelined | 4,096 | 5,927,862 | 10.76ms | 14.00ms | 6187.8% | 1.3GiB |
| WebSocket | Echo Pipelined | 16,384 | 5,987,497 | 27.00ms | 41.70ms | 6035.9% | 1.6GiB |
| WebSocket | Echo Short-lived | 512 | 2,085,409 | 129us | 414us | 5171.5% | 1.2GiB |
| WebSocket | Echo Short-lived | 4,096 | 2,496,360 | 969us | 1.73ms | 6014.4% | 1.3GiB |
Compared with
The Zig entries around uWebZockets on the HTTP/1.1 composite, and the one leading them. The last column shows every profile side by side.
| Entry | Composite | vs uWebZockets | |
|---|---|---|---|
| nilo | 7489 | +86% | head to head |
| dusty | 6938 | +72% | head to head |
| zix | 4794 | +19% | head to head |
| libxev | 3864 | -4% | head to head |
| zeemo | 3731 | -7% | head to head |
Compare uWebZockets with any Zig entry · Compare uWebZockets with any entry, in any language · Every Zig entry, ranked
Results updated · How the benchmark is run · The machine · Add or fix an entry