HttpArena
Frameworks

fib

Experimental · Go · standard configuration · completeness 2/4

fib (Fast In Balance) Go networking library: one edge-triggered epoll event loop feeding a logical worker pool, where each connection is an ordered task that any idle worker may run. Its http package serves HTTP/1.1, HTTP/2 (ALPN and prior-knowledge h2c) and, through package http3, HTTP/3 over its own QUIC, all through one handler taking a *http.Request and a Context; TLS through package tls on crypto/tls. Default configuration throughout; the certificate on the opt-in TLS hardening listener is picked per handshake through tls.Config.GetCertificate, so a renewed pair is served without a restart. Handlers dispatch on the path themselves; the JSON routes sit behind fib's compress middleware (middleware.Chain with compress.New(), defaults), which gzips per request as Accept-Encoding allows. /delay and /async-db answer retained requests from a timer and a goroutine, and /static goes through net/http's ServeContent on the Context, choosing the pre-compressed twin on disk off Accept-Encoding.

Achievements

🥇 1 Gold · 🥈 2 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
🥇 GoldTest profileEfficiency · Latency-10K1 of 4
🥈 SilverTest profileWebSocket · Echo Pipelined2 of 4
🥈 SilverTest profileWorkload · 8Gbit2 of 4
🥉 BronzeFamily compositeComposite · WebSocket3 of 4
🥉 BronzeTest profileConcurrency · Async Delay3 of 4
🥉 BronzeTest profileWebSocket · Echo3 of 4
🥉 BronzeTest profileWebSocket · Echo Short-lived3 of 4
🥉 BronzeTest profileWorkload · JSON Comp3 of 4

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.14 of 52820
HTTP/22 of 2429
HTTP/31 of 2812
WebSocket3 of 4885

Every result

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

CategoryProfileConnsReq/secAvgp99CPUMemory
ConnectionBaseline4,096628,6966.53ms28.00ms3746.8%199MiB
ConnectionPipelined4,0964,397,68014.55ms356.80ms2974.7%284MiB
ConnectionShort-lived4,096298,74213.69ms28.70ms2196.9%141MiB
ConcurrencyAsync Delay32,000923,89834.35ms43.40ms3221.0%387MiB
EfficiencyLatency-10K1,0249,98379.0us110.0us42.1%48MiB
EfficiencyLatency-1M1,024675,7843111960.7us6375424.0us3123.7%134MiB
EfficiencyLatency-500K/81,024343,7103145726.4us6174720.0us742.5%50MiB
WorkloadJSON Comp4,096166,08024.61ms86.80ms4448.9%486MiB
WorkloadJSON Comp16,384183,75087.21ms366.60ms4355.8%806MiB
WorkloadJSON TLS4,096360,65239.57ms960.52ms4530.6%340MiB
Workload8Gbit51249,247224.3us1301.0us601.5%98MiB
WorkloadStatic TLS1,024219,57016.06ms293.76ms4327.0%168MiB
DatabaseAsync DB1,02477,42812.75ms29.20ms3480.6%154MiB
HTTP/2Baseline256788,47830.81ms345.90ms3923.7%198MiB
HTTP/2Baseline1,024977,75091.82ms1.47s4282.4%490MiB
HTTP/2Static25699,17780.19ms1.07s3172.4%330MiB
HTTP/2Static1,024118,753254.08ms2.51s3441.4%647MiB
HTTP/2Baseline (h2c)256721,71634.14ms382.93ms3857.7%164MiB
HTTP/2Baseline (h2c)1,0241,005,39194.28ms904.18ms4518.4%367MiB
HTTP/2Baseline (h2c)4,0961,243,452278.06ms3.05s4997.2%578MiB
HTTP/2JSON (h2c)1,024208,563150.92ms1.35s3791.2%260MiB
HTTP/2JSON (h2c)4,096319,977361.45ms2.90s4354.4%675MiB
HTTP/3Baseline64677,6204.36ms31.24ms2934.1%116MiB
HTTP/3Static6439,45156.73ms1.05s993.7%237MiB
WebSocketEcho5121,187,938430us1.01ms2287.6%50MiB
WebSocketEcho4,0961,358,4373.02ms4.34ms2555.4%92MiB
WebSocketEcho16,3841,139,16414.04ms16.50ms2407.4%196MiB
WebSocketEcho Pipelined51214,722,476555us1.45ms3042.9%55MiB
WebSocketEcho Pipelined4,09618,352,5373.57ms5.21ms3883.9%90MiB
WebSocketEcho Pipelined16,38415,720,46716.32ms19.00ms2884.0%203MiB
WebSocketEcho Short-lived512427,2001.06ms2.01ms1043.7%68MiB
WebSocketEcho Short-lived4,096480,6326.99ms22.00ms1213.2%124MiB

Compared with

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

EntryCompositevs fib
fiber-tuned6394+127%head to head
go-fasthttp3234+15%head to head
fib-tuned2844+1%head to head
echo2295-19%head to head
gin2266-20%head to head

Compare fib with any Go entry · Compare fib with any entry, in any language · Every Go entry, ranked

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