zix
Engine · Zig · engine: zix.Http1 URING Dispatch Model
HTTP/1.1 on the zix.Http1 raw engine, .URING dispatch: per-worker SO_REUSEPORT io_uring loops, comptime Router, staged send sink. Dual listener: cleartext 8080, TLS 1.3 on 8081. Database routes run on engine-worker lanes, each worker pumping its own pipelined postgrez connections on its ring with named prepared statements. No response cache and no startup pre-serialization anywhere: json serializes every field per request and compresses per request, static opens the file per request. The crud row cache is the 200 ms cache-aside the crud profile itself defines.
Achievements
🥇 11 Gold · 🥈 2 Silver · 🥉 2 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 | Family composite | Composite · HTTP/2 | 1 of 7 |
| 🥇 Gold | Family composite | Composite · HTTP/3 | 1 of 5 |
| 🥇 Gold | Family composite | Composite · WebSocket | 1 of 9 |
| 🥇 Gold | Within its language | Zig · HTTP/1.1 | 1 of 3 |
| 🥇 Gold | Test profile | Connection · Baseline | 1 of 26 |
| 🥇 Gold | Test profile | HTTP/2 · Static | 1 of 7 |
| 🥇 Gold | Test profile | HTTP/3 · Baseline | 1 of 5 |
| 🥇 Gold | Test profile | HTTP/3 · Static | 1 of 5 |
| 🥇 Gold | Test profile | WebSocket · Echo | 1 of 9 |
| 🥇 Gold | Test profile | WebSocket · Echo Short-lived | 1 of 4 |
| 🥇 Gold | Test profile | Workload · JSON TLS | 1 of 14 |
| 🥈 Silver | Test profile | HTTP/2 · Baseline | 2 of 7 |
| 🥈 Silver | Test profile | HTTP/2 · Baseline (h2c) | 2 of 5 |
| 🥉 Bronze | Test profile | Connection · Short-lived | 3 of 26 |
| 🥉 Bronze | Test profile | WebSocket · Echo Pipelined | 3 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 |
|---|---|---|
| HTTP/1.1 | 5 of 26 | 4839 |
| HTTP/2 | 1 of 7 | 2943 |
| HTTP/3 | 1 of 5 | 2000 |
| gRPC | 1 of 2 | 2000 |
| WebSocket | 1 of 9 | 2958 |
Every result
Alpha Round, 33 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 | 4,442,329 | 921us | 1.19ms | 6427.0% | 194MiB |
| Connection | Pipelined | 4,096 | 58,761,616 | 1.11ms | 1.59ms | 6408.9% | 193MiB |
| Connection | Short-lived | 4,096 | 2,708,192 | 1.37ms | 1.89ms | 5826.4% | 236MiB |
| Efficiency | Latency-10K | 1,024 | 9,980 | 75.5us | 102.0us | 26.1% | 146MiB |
| Efficiency | Latency-1M | 1,024 | 997,527 | 117.9us | 153.0us | 2072.8% | 145MiB |
| Workload | JSON Comp | 4,096 | 1,046,581 | 3.87ms | 8.60ms | 6825.8% | 212MiB |
| Workload | JSON Comp | 16,384 | 1,018,808 | 15.97ms | 23.70ms | 6533.4% | 527MiB |
| Workload | JSON TLS | 4,096 | 1,845,248 | 1.38ms | 109.34ms | 5396.1% | 280MiB |
| Workload | Static TLS | 1,024 | 339,689 | 3.01ms | 30.48ms | 6603.4% | 228MiB |
| Database | Async DB | 1,024 | 400,444 | 1.98ms | 20.40ms | 3183.3% | 337MiB |
| HTTP/2 | Baseline | 256 | 14,076,613 | 1.09ms | 17.29ms | 4108.2% | 120MiB |
| HTTP/2 | Baseline | 1,024 | 14,090,534 | 3.65ms | 99.66ms | 4164.7% | 216MiB |
| HTTP/2 | Static | 256 | 1,692,045 | 3.58ms | 60.58ms | 5935.6% | 217MiB |
| HTTP/2 | Static | 1,024 | 1,650,640 | 16.19ms | 169.67ms | 6431.3% | 563MiB |
| HTTP/2 | Baseline (h2c) | 256 | 13,956,726 | 1.05ms | 6.54ms | 3999.4% | 106MiB |
| HTTP/2 | Baseline (h2c) | 1,024 | 14,569,901 | 3.78ms | 58.31ms | 4171.5% | 126MiB |
| HTTP/2 | Baseline (h2c) | 4,096 | 13,411,078 | 14.89ms | 58.21ms | 3900.5% | 220MiB |
| HTTP/2 | JSON (h2c) | 1,024 | 6,821,589 | 2.42ms | 18.67ms | 3891.6% | 177MiB |
| HTTP/2 | JSON (h2c) | 4,096 | 6,746,440 | 11.33ms | 104.64ms | 4204.8% | 425MiB |
| HTTP/3 | Baseline | 64 | 9,086,240 | 437us | 796us | 1281.9% | 412MiB |
| HTTP/3 | Static | 64 | 595,586 | 6.42ms | 20.04ms | 3297.5% | 412MiB |
| gRPC | Unary | 256 | 7,000,555 | 2.20ms | 9.47ms | 2791.2% | 180MiB |
| gRPC | Unary | 1,024 | 7,030,197 | 7.52ms | 32.57ms | 2904.3% | 206MiB |
| gRPC | Unary TLS | 256 | 6,962,147 | 2.22ms | 20.73ms | 2903.7% | 201MiB |
| gRPC | Unary TLS | 1,024 | 6,781,146 | 7.66ms | 98.54ms | 2877.7% | 318MiB |
| WebSocket | Echo | 512 | 4,277,156 | 119us | 202us | 6402.6% | 206MiB |
| WebSocket | Echo | 4,096 | 4,469,914 | 915us | 1.20ms | 6419.3% | 251MiB |
| WebSocket | Echo | 16,384 | 4,254,843 | 3.84ms | 4.59ms | 6408.1% | 487MiB |
| WebSocket | Echo Pipelined | 512 | 60,193,061 | 135us | 294us | 6381.1% | 211MiB |
| WebSocket | Echo Pipelined | 4,096 | 66,037,087 | 991us | 2.00ms | 6239.8% | 248MiB |
| WebSocket | Echo Pipelined | 16,384 | 61,907,676 | 4.21ms | 8.35ms | 6152.3% | 497MiB |
| WebSocket | Echo Short-lived | 512 | 2,254,504 | 116us | 351us | 5259.0% | 176MiB |
| WebSocket | Echo Short-lived | 4,096 | 2,566,106 | 1.02ms | 1.74ms | 5761.4% | 280MiB |
Compared with
The Zig entries around zix on the HTTP/1.1 composite, and the one leading them. The last column shows every profile side by side.
| Entry | Composite | vs zix | |
|---|---|---|---|
| swerver | 6825 | +41% | head to head |
| libxev | 3920 | -19% | head to head |
| zeemo | 3773 | -22% | head to head |
Compare zix with any Zig entry · Compare zix with any entry, in any language · Every Zig entry, ranked
Results updated · How the benchmark is run · The machine · Add or fix an entry