swerver
Engine · Zig
swerver as an engine: no pre-computed response bodies (pre-encoded registry off), JSON serialized per request through the framework's std.json-based ctx.jsonValue, static files served from an in-memory cache with precompressed .br/.gz negotiation, and the native async PostgreSQL client (pipelined, prepared-statement cache, park/resume) for async-db and fortunes. Single-threaded event loop per worker, SO_REUSEPORT fork fan-out, one multi-listener process for the four protocol ports, native HTTP/1.1 + HTTP/2 + HTTP/3 (QUIC), kqueue/epoll/io_uring backends.
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. 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 34 | 356 |
| HTTP/2 | 3 of 6 | 216 |
| HTTP/3 | 3 of 3 | 75 |
Every result
Alpha Round, 29 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 | 512 | 3,519,409 | 144us | 360us | 6487.1% | 1.0GiB |
| Connection | Baseline | 4,096 | 3,690,482 | 1.11ms | 2.17ms | 6390.7% | 1.0GiB |
| Connection | Pipelined | 512 | 24,027,148 | 340us | 729us | 6808.4% | 1021MiB |
| Connection | Pipelined | 4,096 | 24,258,825 | 2.70ms | 3.39ms | 6612.6% | 1.0GiB |
| Connection | Short-lived | 512 | 2,306,414 | 208us | 721us | 5783.2% | 1.0GiB |
| Connection | Short-lived | 4,096 | 2,630,808 | 1.46ms | 3.26ms | 6285.8% | 1.1GiB |
| Workload | JSON | 4,096 | 1,897,044 | 1.60ms | 4.73ms | 6475.8% | 1.1GiB |
| Workload | JSON Comp | 512 | 391,723 | 1.30ms | 6.74ms | 5930.6% | 1.0GiB |
| Workload | JSON Comp | 4,096 | 427,413 | 9.56ms | 26.30ms | 6399.4% | 1.1GiB |
| Workload | JSON Comp | 16,384 | 418,470 | 38.86ms | 74.00ms | 6335.6% | 1.2GiB |
| Workload | JSON TLS | 4,096 | 1,522,080 | 2.64ms | - | 6523.0% | 1.3GiB |
| Workload | Upload | 32 | 2,119 | 15.07ms | 82.50ms | 1930.0% | 2.5GiB |
| Workload | Upload | 256 | 2,204 | 112.56ms | 727.00ms | 5325.6% | 2.6GiB |
| Workload | Static | 1,024 | 1,421,524 | 446.67us | - | 5636.1% | 1.1GiB |
| Workload | Static | 4,096 | 1,333,484 | 1.79ms | - | 6184.8% | 1.3GiB |
| Workload | Static | 6,800 | 1,196,817 | 4.95ms | - | 6388.0% | 1.4GiB |
| Database | Async DB | 1,024 | 370,745 | 2.08ms | 15.90ms | 3795.8% | 1.1GiB |
| Database | Fortunes | 1,024 | 293,414 | 1.49ms | 5.75ms | 4474.9% | 1.1GiB |
| HTTP/2 | Baseline | 256 | 3,953,950 | 5.35ms | - | 5522.3% | 1.1GiB |
| HTTP/2 | Baseline | 1,024 | 4,258,709 | 19.28ms | - | 6331.6% | 1.6GiB |
| HTTP/2 | Static | 256 | 1,140,815 | 6.93ms | - | 6272.0% | 1.5GiB |
| HTTP/2 | Static | 1,024 | 1,088,303 | 28.17ms | - | 6529.1% | 2.3GiB |
| HTTP/2 | Baseline (h2c) | 256 | 12,592,507 | 1.16ms | - | 4197.4% | 1.1GiB |
| HTTP/2 | Baseline (h2c) | 1,024 | 12,853,389 | 4.23ms | - | 4259.0% | 1.5GiB |
| HTTP/2 | Baseline (h2c) | 4,096 | 11,766,888 | 19.49ms | - | 3976.7% | 3.0GiB |
| HTTP/2 | JSON (h2c) | 1,024 | 4,673,017 | 6.71ms | - | 6489.7% | 1.5GiB |
| HTTP/2 | JSON (h2c) | 4,096 | 4,651,866 | 28.09ms | - | 6349.1% | 3.1GiB |
| HTTP/3 | Baseline | 64 | 907,695 | 2.39ms | 6.67ms | 4240.3% | 1.2GiB |
| HTTP/3 | Static | 64 | 403,355 | 272us | 634us | 3411.1% | 1.2GiB |
How the benchmark is run · The machine · Add or fix an entry