HttpArena

mojo-http

Experimental · Mojo · standard configuration · completeness 4/4

mojo-http, built with Mojo 1.2.0 and its own compiler patches: its own HTTP/1.1, HTTP/2, HTTP/3 (QUIC), TLS 1.3 (AWS-LC primitives) and WebSocket implementations, routing through mojo_http's Router, static files through its Static handler (a per-worker cache that follows the disk, pre-compressed .br/.gz twins), JSON through the API layer's writer, gzip through its Compress wrapper (deflate in Mojo), fortunes through its template engine (Vue's template syntax, compiled when loaded, escaped by default), gRPC unary calls (its own protobuf codec, trailers over HTTP/2), PostgreSQL through its own driver (wire protocol, SCRAM, prepared statements, pipelined worker-local pools), one worker per CPU. The gateway and production-stack profiles run this image behind a proxy: mojo-http_caddy and mojo-http_nginx.

Achievements

🥇 9 Gold · 🥈 3 Silver · 🥉 5 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.

MedalAwardFieldRank
🥇 GoldFamily compositeComposite · Database1 of 8
🥇 GoldFamily compositeComposite · gRPC1 of 9
🥇 GoldTest profileDatabase · Async DB1 of 8
🥇 GoldTest profileDatabase · Fortunes1 of 5
🥇 GoldTest profileHTTP/2 · Baseline1 of 18
🥇 GoldTest profileHTTP/2 · Baseline (h2c)1 of 19
🥇 GoldTest profileWorkload · JSON Comp1 of 30
🥇 GoldTest profilegRPC · Unary1 of 9
🥇 GoldTest profilegRPC · Unary TLS1 of 9
🥈 SilverTest profileConcurrency · Async Delay2 of 29
🥈 SilverTest profileEfficiency · Latency-10K2 of 31
🥈 SilverTest profileWorkload · JSON TLS2 of 30
🥉 BronzeFamily compositeComposite · HTTP/23 of 19
🥉 BronzeFamily compositeComposite · HTTP/33 of 12
🥉 BronzeTest profileConnection · Baseline3 of 33
🥉 BronzeTest profileHTTP/3 · Baseline3 of 12
🥉 BronzeTest profileWebSocket · Echo Short-lived3 of 22

Composite rank

Each profile of a family is worth its weight × 1,000 to the entry that leads it - 1, or 0.5 apiece for two profiles that measure one thing - 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.16 of 335840
HTTP/23 of 193360
HTTP/33 of 121723
gRPC1 of 92000
WebSocket6 of 242831
Database1 of 82000

Every result

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

CategoryProfileConnsReq/secAvgp99CPUMemory
ConnectionBaseline4,0964,066,0661.01ms1.30ms6212.1%280MiB
ConnectionPipelined4,09635,609,8301.84ms2.45ms6484.0%272MiB
ConnectionShort-lived4,0962,697,8941.38ms1.96ms5932.8%300MiB
ConcurrencyAsync Delay32,0002,904,64711.02ms12.30ms5861.3%480MiB
EfficiencyLatency-10K1,0249,98365.4us99.0us19.6%244MiB
EfficiencyLatency-1M1,024997,78291.9us164.0us2224.9%247MiB
WorkloadJSON Comp4,0961,072,0753.82ms9.08ms6587.7%330MiB
WorkloadJSON Comp16,3841,053,73415.56ms46.50ms6734.0%523MiB
WorkloadJSON TLS4,0961,823,5081.21ms34.78ms5155.3%701MiB
Workload8Gbit51249,41385.8us108.0us193.5%637MiB
WorkloadStatic TLS1,024898,2881.07ms15.13ms6422.7%975MiB
DatabaseAsync DB1,024390,6112.62ms14.10ms2694.1%404MiB
DatabaseFortunes1,024204,1245.02ms8.70ms3216.8%252MiB
HTTP/2Baseline25616,379,304810us1.40ms2373.7%292MiB
HTTP/2Baseline1,02416,337,6233.09ms5.67ms2524.6%328MiB
HTTP/2Static256871,6009.83ms26.21ms5980.3%1.1GiB
HTTP/2Static1,024909,69435.17ms74.43ms6309.2%808MiB
HTTP/2Baseline (h2c)25616,662,420784us1.39ms2377.7%285MiB
HTTP/2Baseline (h2c)1,02416,737,0092.99ms6.04ms2494.1%335MiB
HTTP/2Baseline (h2c)4,09615,877,89314.06ms45.19ms2319.7%468MiB
HTTP/2JSON (h2c)1,0243,934,2227.84ms14.08ms6425.4%452MiB
HTTP/2JSON (h2c)4,0963,867,51332.99ms56.12ms6302.6%841MiB
HTTP/3Baseline646,664,086534us1.22ms2546.4%163MiB
HTTP/3Static64939,7945.11ms10.57ms3642.9%308MiB
gRPCUnary2567,211,0332.16ms5.29ms1619.5%326MiB
gRPCUnary1,0247,281,9367.25ms10.98ms1734.7%344MiB
gRPCUnary TLS2567,140,6162.14ms2.79ms1711.0%294MiB
gRPCUnary TLS1,0247,109,0517.39ms12.49ms1737.0%339MiB
WebSocketEcho5124,084,834124us285us6341.0%240MiB
WebSocketEcho4,0964,217,684970us1.47ms6194.5%300MiB
WebSocketEcho16,3843,894,4334.21ms5.58ms6080.1%585MiB
WebSocketEcho Pipelined51258,798,265138us304us6390.4%241MiB
WebSocketEcho Pipelined4,09660,459,5521.08ms1.61ms6247.6%341MiB
WebSocketEcho Pipelined16,38455,823,2124.70ms6.54ms6114.7%581MiB
WebSocketEcho Short-lived5122,349,383176us522us5696.1%600MiB
WebSocketEcho Short-lived4,0962,535,0481.35ms2.04ms5935.7%693MiB

Compare mojo-http with any Mojo entry · Compare mojo-http with any entry, in any language · Every Mojo entry, ranked

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