Performance

Benchmarks

Latest published HTTPS numbers from the Ubuntu 24 bare-metal Linux runtime. Same payload, same concurrency points. ALOS on its custom epoll event-loop backend, head-to-head against Go Fiber v3 (prefork), Go Gin, and two Rust frameworks, over both HTTP/1.1 and HTTP/2.

Benchmark Environment

These published numbers come from an Ubuntu 24 bare-metal rerun using local loopback and the native Linux runtime.

Ubuntu 24 on xeon E3-1270 8 thread
Linux amd64 bare metal
wrk + h2load over HTTPS
HTTP/1.1 and HTTP/2, 8 threads
Custom epoll backend
Edge-triggered, SO_REUSEPORT per core

All five frameworks were tested over HTTPS with TLS 1.3 serving the same Hello, World! response body. wrk drives the HTTP/1.1 runs and h2load drives the HTTP/2 runs against every server, for true apples-to-apples comparisons on the same bare-metal 8-core box. Go Fiber v3 has no HTTP/2 support, so it appears only in the HTTP/1.1 results.

Methodology

Every framework was tested under identical conditions to ensure a fair comparison:

  • Benchmark tools - wrk (8 threads) for HTTP/1.1; h2load (8 threads, 100 connections × 256 streams) for HTTP/2
  • Protocols - HTTPS with TLS 1.3, measured over both HTTP/1.1 and HTTP/2
  • Payload - Same Hello, World! response body across all frameworks
  • Concurrency levels - HTTP/1.1 at 200, 500, 800, 1,200, 3,500 and 5,000 connections; HTTP/2 at 256 multiplexed streams per connection
  • Frameworks - ALOS, Go Fiber v3 (prefork) and Go Gin against two Rust frameworks, xitca-web and ntex (both on rustls), tested side-by-side. Fiber v3 is HTTP/1.1 only.
  • Environment - Local loopback on Ubuntu 24 bare metal (Xeon E3-1270 v6, 8 threads)

Why ALOS is faster: ALOS HTTP bypasses net/http entirely. On Linux amd64 it runs a custom edge-triggered epoll event loop with SO_REUSEPORT listener sharding across cores, a hand-rolled TLS 1.3 record layer, per-connection response batching, and zero-allocation routing hot paths. There are no interface dispatches or reflection in the request pipeline.

HTTP/1.1 Throughput (Requests/sec)

Peak HTTP/1.1 requests per second at 500 concurrent connections, the sweet spot for maximum throughput:

Peak Throughput (500 connections)

ALOS HTTP Winner
218K
218,141 req/s
xitca-web Rust
194K
194,218 req/s
ntex Rust
176K
176,238 req/s
Fiber v3
173K
173,422 req/s
Gin
127K
127,170 req/s
ALOS HTTP delivers 12.3% higher throughput than xitca-web (Rust), 23.8% higher than ntex (Rust), 25.8% higher than Fiber v3, and 71.5% higher than Gin at peak load

Throughput at All Connection Levels

Framework200 conn500 conn800 conn1,200 conn3,500 conn5,000 conn
ALOS HTTP221,695218,141206,745195,233149,019129,805
xitca-web Rust198,342194,218182,341172,583137,283114,299
ntex Rust170,770176,238169,109159,109125,114108,986
Fiber v3179,817173,422164,701156,450122,179101,320
Gin129,082127,170124,298112,59394,01666,645

HTTP/1.1 Latency

Lower is better. Average HTTP/1.1 response time at 200 concurrent connections:

Average Latency (200 connections)

ALOS HTTP Winner
0.88ms
0.88 ms
xitca-web Rust
1.20ms
1.20 ms
ntex Rust
1.21ms
1.21 ms
Fiber v3
1.26ms
1.26 ms
Gin
1.87ms
1.87 ms
ALOS HTTP responds 26.7% faster than xitca-web (Rust), 27.3% faster than ntex (Rust), 30.2% faster than Fiber v3, and 52.9% faster than Gin at low concurrency

Avg Latency at All Connection Levels

Framework200 conn500 conn800 conn1,200 conn3,500 conn5,000 conn
ALOS HTTP0.88 ms1.88 ms3.03 ms5.06 ms20.46 ms36.09 ms
xitca-web Rust1.20 ms2.39 ms4.00 ms6.48 ms25.39 ms44.49 ms
ntex Rust1.21 ms2.49 ms4.19 ms6.73 ms28.05 ms42.45 ms
Fiber v31.26 ms2.77 ms4.46 ms7.04 ms27.97 ms48.34 ms
Gin1.87 ms4.08 ms6.29 ms10.45 ms28.91 ms43.74 ms

Max Latency (Worst-Case)

Framework200 conn500 conn800 conn1,200 conn3,500 conn5,000 conn
ALOS HTTP39.75 ms88.26 ms159.33 ms203.46 ms537.34 ms849.76 ms
xitca-web Rust45.39 ms73.57 ms121.93 ms186.68 ms508.00 ms752.86 ms
ntex Rust45.65 ms77.92 ms125.68 ms185.57 ms578.20 ms856.09 ms
Fiber v335.07 ms83.17 ms126.07 ms191.90 ms586.39 ms867.96 ms
Gin42.11 ms78.55 ms121.01 ms294.63 ms457.55 ms438.61 ms

HTTP/1.1 Transfer Rate

HTTP/1.1 data throughput in megabytes per second at all connection levels:

Peak Transfer Rate (500 connections)

ALOS HTTP Winner
27.3 MB
27.25 MB/s
xitca-web Rust
24.1 MB
24.08 MB/s
ntex Rust
21.9 MB
21.85 MB/s
Fiber v3
21.5 MB
21.50 MB/s
Gin
15.8 MB
15.77 MB/s
ALOS HTTP pushes 13.2% more data than xitca-web (Rust), 24.7% more than ntex (Rust), 26.7% more than Fiber v3, and 72.8% more than Gin per second

Transfer/sec at All Connection Levels

Framework200 conn500 conn800 conn1,200 conn3,500 conn5,000 conn
ALOS HTTP27.70 MB27.25 MB25.83 MB24.39 MB18.62 MB16.22 MB
xitca-web Rust24.59 MB24.08 MB22.61 MB21.40 MB17.02 MB14.17 MB
ntex Rust21.17 MB21.85 MB20.97 MB19.74 MB15.55 MB13.57 MB
Fiber v322.29 MB21.50 MB20.42 MB19.40 MB15.15 MB12.56 MB
Gin16.00 MB15.77 MB15.41 MB13.96 MB11.66 MB8.26 MB

HTTP/1.1 Full Rankings

Complete HTTP/1.1 results from all five frameworks at peak throughput (500 connections), ranked by requests/sec:

#FrameworkRequests/secAvg LatencyTransfer/secvs ALOS
🥇ALOS HTTP218,1411.88 ms27.25 MB/sbaseline
🥈xitca-web Rust194,2182.39 ms24.08 MB/s-11.0%
🥉ntex Rust176,2382.49 ms21.85 MB/s-19.2%
4Fiber v3173,4222.77 ms21.50 MB/s-20.5%
5Gin127,1704.08 ms15.77 MB/s-41.7%

HTTP/2 Throughput

The same servers over the same TLS 1.3, but with HTTP/2 stream multiplexing - many concurrent requests share each connection, so the per-syscall cost is amortized across hundreds of in-flight streams. Driven by h2load (8 client threads, 100 connections × 256 streams, peak of 3 runs). Fiber v3 is excluded here because fasthttp does not support HTTP/2. All four servers advertise a 256-stream limit, so this is a fair head-to-head.

Peak HTTP/2 Throughput (256 streams per connection)

ALOS HTTP Winner
2.76M
2,759,005 req/s
xitca-web Rust
1.36M
1,364,879 req/s
ntex Rust
308K
307,983 req/s
Gin
140K
140,428 req/s
Under HTTP/2 multiplexing ALOS HTTP delivers 2.0× the throughput of xitca-web (Rust), 9.0× ntex (Rust), and 19.6× Gin, because its epoll backend batches hundreds of multiplexed streams per read/write syscall

HTTP/2 Throughput & Latency

FrameworkRequests/secAvg LatencyMax Latency
ALOS HTTP2,759,0054.6 ms19.5 ms
xitca-web Rust1,364,87914.3 ms77.7 ms
ntex Rust307,98344.0 ms135.5 ms
Gin140,428175.7 ms2,220 ms

HTTP/1.1 vs HTTP/2: ALOS serves the same Hello, World! at ~218K req/s over HTTP/1.1 and ~2.76M req/s over HTTP/2 on the same 8-core box (roughly a 12× jump) because HTTP/2 multiplexing lets a single recv/send syscall carry hundreds of requests instead of one.

Router Benchmarks

Micro-benchmarks comparing the ALOS radix-tree router against four alternative routing strategies. All tests use go test -bench on the same machine with zero allocations as the target.

Five router implementations tested: ALOS Router (optimized radix tree with SoA hash table), Regex Router (compiled regexp per route), Trie Router (segment-based trie), Map Router (Go map with segment splitting), and Linear Router (brute-force linear scan).

Static Routes

PathALOSTrieMapRegexLinear
/7.0 ns9.1 ns28.1 ns82.4 ns44.4 ns
/users8.9 ns12.1 ns28.2 ns131 ns52.8 ns
/api/v1/repos9.1 ns18.1 ns28.9 ns393 ns157 ns
/api/v1/health9.1 ns19.3 ns29.5 ns702 ns210 ns
/api/v2/status12.4 ns19.1 ns29.3 ns845 ns262 ns
ALOS resolves static routes in 7-12 ns regardless of depth via SoA hash table lookup - 2x faster than Trie, 3x faster than Map

Parametric Routes

PatternALOSTrieMapRegexLinear
1 param18.8 ns63.1 ns171 ns254 ns190 ns
2 params23.1 ns111 ns314 ns510 ns333 ns
3 params33.6 ns195 ns733 ns1,064 ns807 ns
Deep (4 segments)35.5 ns193 ns1,267 ns1,956 ns1,582 ns
ALOS extracts parameters with zero allocations using a fixed-size param array - 3-5x faster than Trie, 13-55x faster than Regex

Mixed Workload

Realistic traffic mix of static, parametric, and wildcard lookups cycled round-robin.

Regex
952 ns
951.6 ns/op
Linear
342 ns
341.5 ns/op
Map
273 ns
273.4 ns/op
Trie
104 ns
104.1 ns/op
ALOS Winner
17.5 ns
17.48 ns/op
Under realistic mixed traffic, ALOS is 6x faster than Trie and 54x faster than Regex

Wildcard / Catch-All

Matching /files/static/images/logo.png against a /files/*filepath catch-all route.

Regex
1,765 ns
1,765 ns/op
Map
391 ns
391.0 ns/op
Linear
380 ns
379.5 ns/op
Trie
72.5 ns
72.47 ns/op
ALOS Winner
19.8 ns
19.84 ns/op
ALOS resolves catch-all routes in under 20 ns - 3.7x faster than Trie, 89x faster than Regex

Large Route Table (400 routes)

Stress test with 400 routes across 5 API versions, 10 resources, and 4 HTTP methods.

ScenarioALOSTrieMapRegexLinear
Static Hit12.3 ns21.4 ns31.7 ns1,016 ns646 ns
Param Hit30.2 ns61.4 ns643 ns2,625 ns1,141 ns
Miss11.5 ns10.4 ns506 ns4,379 ns948 ns
With 400 routes, ALOS static lookups stay at 12 ns thanks to an O(1) hash table, and param hits are 2x faster than Trie and 87x faster than Regex

Full Router Rankings

#RouterStatic (avg)1-ParamMixedLarge TableAllocs
🥇ALOS Router9.1 ns18.8 ns17.5 ns12.3 ns0
🥈Trie Router15.5 ns63.1 ns104 ns21.4 ns0-3
🥉Map Router28.8 ns171 ns273 ns31.7 ns0-17
4Linear Router138 ns190 ns342 ns646 ns1-16
5Regex Router410 ns254 ns952 ns1,016 ns1-3