vanilla-h2c
Engine · V · engine: epoll
HTTP/2 cleartext (h2c, prior-knowledge) on vanilla's conn-mode seam: one epoll engine drives the RFC 9113 state machine behind a ConnHandler. The client's PRI * HTTP/2.0 preface parses as an ordinary request; the HTTP handler flips the connection over (core.queue_takeover), appends the server SETTINGS preface, and every later burst is fed to the http2 machine instead of the HTTP/1.1 parser. The http2 module is a self-contained RFC 9113/7541 codec: HPACK (static + dynamic table, canonical Huffman decode, decoded-block ceiling), frame codec, and a stream state machine with send-side flow control, hardened against a live h2spec CI gate. Requests surface only when COMPLETE (END_STREAM); responses are HPACK-encoded HEADERS + DATA. The :8082 listener is h2c-only — a plain HTTP/1.1 request is refused 505, never a 200, so the benchmark cannot silently measure h1 throughput. /json reuses the vanilla /json shape (same dataset, precomputed per-item prefixes, total = price*quantity*m). unary-grpc runs on the same machine on :8080: GetSum decodes the length-prefixed SumRequest (a protobuf varint loop that skips unknown fields), answers HEADERS + the SumReply as DATA without END_STREAM, then grpc-status 0 as trailers, which wait behind any DATA parked on flow control (enghitalo/vanilla#174). Each connection reuses its request list and buffers; the gRPC header blocks are encoded once. Multi-threaded, SO_REUSEPORT, lock-free, -gc none. Pinned V 0.5.2 (prebuilt from source).
Achievements
🥇 2 Gold. 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 | HTTP/2 · Baseline (h2c) | 1 of 11 |
| 🥇 Gold | Test profile | gRPC · Unary | 1 of 3 |
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/2 | 5 of 14 | 1000 |
| gRPC | 3 of 3 | 1000 |
Every result
Alpha Round, 7 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 |
|---|---|---|---|---|---|---|---|
| HTTP/2 | Baseline (h2c) | 256 | 15,749,463 | 840us | 20.51ms | 2121.9% | 118MiB |
| HTTP/2 | Baseline (h2c) | 1,024 | 15,460,256 | 4.05ms | 111.80ms | 2476.8% | 206MiB |
| HTTP/2 | Baseline (h2c) | 4,096 | 12,653,654 | 32.35ms | 533.31ms | 2422.0% | 1.3GiB |
| HTTP/2 | JSON (h2c) | 1,024 | 4,670,555 | 5.33ms | 61.19ms | 6294.9% | 541MiB |
| HTTP/2 | JSON (h2c) | 4,096 | 3,807,159 | 35.12ms | 314.59ms | 6030.8% | 1.9GiB |
| gRPC | Unary | 256 | 7,323,273 | 2.08ms | 21.85ms | 1380.6% | 165MiB |
| gRPC | Unary | 1,024 | 7,092,189 | 8.55ms | 121.70ms | 1436.3% | 224MiB |
Compare vanilla-h2c with any V entry · Compare vanilla-h2c with any entry, in any language · Every V entry, ranked
Results updated · How the benchmark is run · The machine · Add or fix an entry