netcode-http
Experimental · Zig · engine: quic-zig · standard configuration · completeness 4/4
netcode-http's router on quic-zig's event loop, which serves HTTP/1.1, WebSocket and HTTP/3 from one loop: one loop per core, sharing the ports through SO_REUSEPORT. Routes decode their query and body from a typed spec; a WebSocket is a route too, on quic-zig's upgrade and framing. QUIC, TLS 1.3 and HTTP/3 are quic-zig's own, in Zig, with no C library.
Achievements
🥇 2 Gold · 🥈 2 Silver · 🥉 1 Bronze. 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 | Within its language | Zig · WebSocket | 1 of 4 |
| 🥇 Gold | Test profile | WebSocket · Echo | 1 of 20 |
| 🥈 Silver | Family composite | Composite · WebSocket | 2 of 20 |
| 🥈 Silver | Test profile | WebSocket · Echo Short-lived | 2 of 18 |
| 🥉 Bronze | Within its language | Zig · HTTP/1.1 | 3 of 4 |
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 | 17 of 26 | 3830 |
| WebSocket | 2 of 20 | 2976 |
Every result
Alpha Round, 14 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,841,604 | 1.06ms | 2.24ms | 6255.4% | 89MiB |
| Connection | Pipelined | 4,096 | 5,362,064 | 12.22ms | 18.80ms | 6626.1% | 85MiB |
| Connection | Short-lived | 4,096 | 2,718,348 | 1.47ms | 5.08ms | 6359.3% | 128MiB |
| Efficiency | Latency-10K | 1,024 | 9,982 | 82.3us | 99.0us | 22.7% | 52MiB |
| Efficiency | Latency-1M | 1,024 | 997,877 | 94.1us | 170.0us | 2276.9% | 54MiB |
| Efficiency | Latency-500K/8 | 1,024 | 498,742 | 1151.4us | 12244.0us | 790.3% | 23MiB |
| WebSocket | Echo | 512 | 4,318,221 | 118us | 299us | 6120.5% | 52MiB |
| WebSocket | Echo | 4,096 | 4,429,976 | 924us | 1.97ms | 6405.7% | 92MiB |
| WebSocket | Echo | 16,384 | 4,121,087 | 3.96ms | 7.88ms | 6400.0% | 222MiB |
| WebSocket | Echo Pipelined | 512 | 62,709,511 | 129us | 359us | 6439.6% | 50MiB |
| WebSocket | Echo Pipelined | 4,096 | 62,749,577 | 1.04ms | 2.16ms | 6487.4% | 92MiB |
| WebSocket | Echo Pipelined | 16,384 | 59,321,372 | 4.39ms | 8.79ms | 6106.8% | 225MiB |
| WebSocket | Echo Short-lived | 512 | 2,201,681 | 124us | 456us | 5048.8% | 77MiB |
| WebSocket | Echo Short-lived | 4,096 | 2,609,196 | 1.02ms | 1.94ms | 5911.8% | 116MiB |
Compared with
The Zig entries around netcode-http on the HTTP/1.1 composite, and the one leading them. The last column shows every profile side by side.
| Entry | Composite | vs netcode-http | |
|---|---|---|---|
| dusty-tuned | 7400 | +93% | head to head |
| zix | 4789 | +25% | head to head |
| libxev | 3863 | +1% | head to head |
| uWebZockets | 3748 | -2% | head to head |
| zeemo | 3730 | -3% | head to head |
Compare netcode-http with any Zig entry · Compare netcode-http with any entry, in any language · Every Zig entry, ranked
Results updated · How the benchmark is run · The machine · Add or fix an entry