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

🥇 14 Gold · 🥈 2 Silver. 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 8
🥇 GoldFamily compositeComposite · HTTP/21 of 5
🥇 GoldFamily compositeComposite · HTTP/31 of 4
🥇 GoldTest profileConnection · Baseline1 of 8
🥇 GoldTest profileConnection · Short-lived1 of 8
🥇 GoldTest profileHTTP/2 · Baseline1 of 5
🥇 GoldTest profileHTTP/2 · Baseline (h2c)1 of 4
🥇 GoldTest profileHTTP/2 · JSON (h2c)1 of 4
🥇 GoldTest profileHTTP/2 · Static1 of 5
🥇 GoldTest profileHTTP/3 · Baseline1 of 4
🥇 GoldTest profileHTTP/3 · Static1 of 4
🥇 GoldTest profileWorkload · 8Gbit1 of 7
🥇 GoldTest profileWorkload · JSON Comp1 of 7
🥇 GoldTest profileWorkload · JSON TLS1 of 7
🥈 SilverTest profileConcurrency · Async Delay2 of 6
🥈 SilverTest profileEfficiency · Latency-1M2 of 7

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 87632
HTTP/21 of 53900
HTTP/31 of 41950
gRPC1 of 21790

Every result

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

CategoryProfileConnsReq/secAvgp99CPUMemory
ConnectionBaseline4,0963,668,6821.12ms2.17ms6284.5%1.0GiB
ConnectionPipelined4,09623,068,2722.84ms3.67ms6796.8%1.0GiB
ConnectionShort-lived4,0962,629,1131.46ms3.18ms6306.6%1.1GiB
ConcurrencyAsync Delay32,0001,710,59218.52ms21.20ms3968.6%1.4GiB
EfficiencyLatency-10K1,0249,97476.6us102.0us31.9%1.0GiB
EfficiencyLatency-1M1,024997,84296.2us175.0us2511.7%1.0GiB
WorkloadJSON Comp4,096421,0129.70ms27.70ms6303.1%1.1GiB
WorkloadJSON Comp16,384414,28139.24ms74.90ms6262.9%1.2GiB
WorkloadJSON TLS4,0961,510,1492.65ms55.48ms6545.7%1.3GiB
Workload8Gbit51249,35596.5us125.0us215.5%2.1GiB
WorkloadStatic TLS1,0241,108,0970.88ms28.20ms6404.6%1.1GiB
DatabaseAsync DB1,024374,3472.06ms13.00ms3865.6%1.1GiB
DatabaseFortunes1,024296,2841.52ms4.92ms3953.2%1.0GiB
HTTP/2Baseline2564,027,9744.76ms36.38ms5647.9%1.2GiB
HTTP/2Baseline1,0244,188,24216.31ms115.19ms6073.4%1.6GiB
HTTP/2Static2561,137,2876.91ms41.96ms6482.3%1.5GiB
HTTP/2Static1,0241,085,94228.17ms171.84ms6517.0%2.3GiB
HTTP/2Baseline (h2c)25612,624,7581.19ms8.24ms4421.1%1.1GiB
HTTP/2Baseline (h2c)1,02412,774,8964.18ms61.07ms4525.1%1.5GiB
HTTP/2Baseline (h2c)4,09611,605,65219.88ms202.30ms4091.3%3.0GiB
HTTP/2JSON (h2c)1,0244,557,3666.88ms63.86ms6502.6%1.5GiB
HTTP/2JSON (h2c)4,0964,434,19029.53ms295.96ms6280.0%3.1GiB
HTTP/3Baseline64890,0942.24ms6.72ms4233.1%1.1GiB
HTTP/3Static64420,864281us659us3708.7%1.2GiB
gRPCUnary2566,821,8072.21ms36.16ms2802.0%1.6GiB
gRPCUnary1,0246,767,1207.74ms35.13ms2963.3%2.0GiB
gRPCUnary TLS2563,552,1555.08ms38.33ms5506.6%1.6GiB
gRPCUnary TLS1,0243,614,78616.49ms114.07ms5845.2%2.1GiB

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
nilo6810-11%head to head
zix4839-37%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