HttpArena
Frameworks

swerver

Experimental · Zig · tuned configuration · completeness 3/4

Experimental Zig web framework built directly on swerver's Router, HandlerContext, middleware, response, and static-file APIs. No pre-computed response bodies (pre-encoded registry off); JSON is serialized per request through ctx.jsonValue; unary gRPC is decoded and encoded per request over h2c and TLS h2; async-db and fortunes use the native async PostgreSQL client (pipelining, prepared-statement cache, park/resume). Single-threaded event loop per worker, SO_REUSEPORT fork fan-out, one multi-listener process for HTTP/1.1, HTTP/2, HTTP/3 (QUIC), kqueue, epoll, and io_uring backends.

Achievements

🥇 11 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.

MedalAwardFieldRank
🥇 GoldFamily compositeComposite · HTTP/1.11 of 3
🥇 GoldFamily compositeComposite · HTTP/21 of 3
🥇 GoldTest profileConnection · Baseline1 of 3
🥇 GoldTest profileConnection · Short-lived1 of 3
🥇 GoldTest profileEfficiency · Latency-10K1 of 3
🥇 GoldTest profileEfficiency · Latency-1M1 of 3
🥇 GoldTest profileHTTP/2 · Baseline1 of 3
🥇 GoldTest profileHTTP/2 · Static1 of 3
🥇 GoldTest profileWorkload · 8Gbit1 of 3
🥇 GoldTest profileWorkload · JSON Comp1 of 3
🥇 GoldTest profileWorkload · JSON TLS1 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.

FamilyRankComposite
HTTP/1.11 of 36825
HTTP/21 of 33900
HTTP/31 of 21950
gRPC2 of 21084

Every result

Alpha Round, 27 runs. Requests per second is the best of three; latency, CPU and memory come from that run.

CategoryProfileConnsReq/secAvgp99CPUMemory
ConnectionBaseline4,0963,665,6271.12ms2.15ms6358.2%1.0GiB
ConnectionPipelined4,09623,561,0302.78ms3.65ms6790.9%1.0GiB
ConnectionShort-lived4,0962,620,1341.47ms3.13ms6294.7%1.1GiB
EfficiencyLatency-10K1,0249,98364.7us98.0us32.2%1.0GiB
EfficiencyLatency-1M1,024997,622100.0us176.0us2453.5%1.0GiB
WorkloadJSON Comp4,096407,78010.02ms28.00ms6389.7%1.1GiB
WorkloadJSON Comp16,384414,29639.12ms74.10ms6308.1%1.2GiB
WorkloadJSON TLS4,0961,502,2722.67ms65.13ms6541.8%1.3GiB
Workload8Gbit51249,42387.7us133.0us221.8%2.1GiB
WorkloadStatic TLS1,0241,101,3060.87ms15.30ms6428.3%1.1GiB
DatabaseAsync DB1,024369,8672.12ms17.20ms3812.1%1.1GiB
DatabaseFortunes1,024290,8941.49ms5.36ms3495.2%1.1GiB
HTTP/2Baseline2563,878,1275.60ms48.09ms5575.1%1.2GiB
HTTP/2Baseline1,0244,203,40819.14ms146.87ms6277.6%1.7GiB
HTTP/2Static2561,134,5407.00ms85.76ms6404.5%1.4GiB
HTTP/2Static1,0241,083,15228.16ms174.23ms6315.5%2.3GiB
HTTP/2Baseline (h2c)25612,451,3411.19ms8.43ms4325.0%1.1GiB
HTTP/2Baseline (h2c)1,02412,505,4674.35ms69.64ms4269.2%1.5GiB
HTTP/2Baseline (h2c)4,09611,606,25620.06ms192.10ms3949.0%3.0GiB
HTTP/2JSON (h2c)1,0244,526,4936.94ms41.02ms6464.6%1.5GiB
HTTP/2JSON (h2c)4,0964,409,38429.60ms180.35ms6346.4%3.1GiB
HTTP/3Baseline64901,5152.51ms7.11ms4225.3%1.2GiB
HTTP/3Static64406,802281us648us3604.2%1.2GiB
gRPCUnary2566,790,3742.22ms15.16ms2745.0%1.6GiB
gRPCUnary1,0246,683,1228.00ms33.50ms2867.1%2.0GiB
gRPCUnary TLS256753,7723.42ms18.02ms883.2%665MiB
gRPCUnary TLS1,0243,6697.28ms48.49ms87.3%501MiB

Compared with

The Zig entries around swerver on the HTTP/1.1 composite, and the one leading them. The last column shows every profile side by side.

EntryCompositevs swerver
zix4839-29%head to head
libxev3920-43%head to head

Compare swerver with any Zig entry · Compare swerver with any entry, in any language · Every Zig entry, ranked

Results updated · How the benchmark is run · The machine · Add or fix an entry