Posts HTTP servers

actix-web vs axum vs rama vs Spring Boot vs Express vs Bun vs Apache httpd vs nginx

The first post's seven HTTP servers on the same 4 Graviton4 cores, with rama 0.4.0 as an eighth, each at its documented setup: the most responses a second each holds at p99 ≤ 50 ms, what 1,000 slow clients cost it in memory, and how fast it serves a 64 MiB file.

rama 0.4.0 came in behind axum, at 224,000 small-JSON responses a second to axum's 288,000 and Bun's 320,000 and ahead of Spring Boot and Express, and actix-web led small and 323 KB JSON again.

Small JSON

A 1 KB JSON document built and serialized on every request: the highest rate held at p99 ≤ 50 ms.

actix-web 491,000 responses/s, axum 272,000 responses/s, rama 219,000 responses/s, Spring Boot 128,000 responses/s, Express 107,000 responses/s, Bun 309,000 responses/s

Test 1 Small JSON

The mean of each candidate's samples: the statistic the scorecard ranks this section by.

Small JSON (K responses/s, higher is better)
actix-web491
axum272
rama219
Spring Boot128
Express107
Bun309
Small JSON in K responses/s
CandidateValue (K responses/s)Lowest pass (K responses/s)Highest pass (K responses/s)Passes
actix-web4914805123
axum2722402883
rama2192082243
Spring Boot1281201443
Express1071041123
Bun3092883203

Mean of 3 passes per candidate; the whisker spans the lowest and highest pass.

16 KB body

16,384 bytes from one shared buffer, or a file for Apache httpd and nginx, under actix-web's 32 KiB write-buffer threshold.

actix-web 352,000 responses/s, axum 352,000 responses/s, rama 331,000 responses/s, Spring Boot 115,000 responses/s, Express 90,700 responses/s, Bun 267,000 responses/s, Apache httpd 48,000 responses/s, nginx 352,000 responses/s

Test 1 16 KB body

The mean of each candidate's samples: the statistic the scorecard ranks this section by.

16 KB body (K responses/s, higher is better)
actix-web352.0
axum352.0
rama330.7
Spring Boot114.7
Express90.7
Bun266.7
Apache httpd48.0
nginx352.0
16 KB body in K responses/s
CandidateValue (K responses/s)Lowest pass (K responses/s)Highest pass (K responses/s)Passes
actix-web352.0352.0352.03
axum352.0352.0352.03
rama330.7320.0352.03
Spring Boot114.7104.0120.03
Express90.788.096.03
Bun266.7256.0288.03
Apache httpd48.048.048.03
nginx352.0352.0352.03

Mean of 3 passes per candidate; the whisker spans the lowest and highest pass; the lead over axum, nginx, and rama is inside the noise.

323 KB shared body

323,000 bytes cloned from one shared buffer, as a server answers from a cache, or a file for Apache httpd and nginx.

actix-web 18,000 responses/s, axum 18,000 responses/s, rama 18,000 responses/s, Spring Boot 18,000 responses/s, Express 13,300 responses/s, Bun 18,000 responses/s, Apache httpd 18,000 responses/s, nginx 18,000 responses/s

Test 1 323 KB shared body

The mean of each candidate's samples: the statistic the scorecard ranks this section by.

323 KB shared body (responses/s, higher is better)
actix-web18,000
axum18,000
rama18,000
Spring Boot18,000
Express13,333
Bun18,000
Apache httpd18,000
nginx18,000
323 KB shared body in responses/s
CandidateValue (responses/s)Lowest pass (responses/s)Highest pass (responses/s)Passes
actix-web18,00018,00018,0003
axum18,00018,00018,0003
rama18,00018,00018,0003
Spring Boot18,00018,00018,0003
Express13,33313,00014,0003
Bun18,00018,00018,0003
Apache httpd18,00018,00018,0003
nginx18,00018,00018,0003

Mean of 3 passes per candidate; the whisker spans the lowest and highest pass; the lead over axum, rama, Spring Boot, Bun, Apache httpd, and nginx is inside the noise.

323 KB body built per request

The same 323,000 bytes copied into a new buffer on every request.

actix-web 18,000 responses/s, axum 18,000 responses/s, rama 18,000 responses/s, Spring Boot 18,000 responses/s, Express 10,300 responses/s, Bun 18,000 responses/s

Test 1 323 KB body built per request

The mean of each candidate's samples: the statistic the scorecard ranks this section by.

323 KB body built per request (responses/s, higher is better)
actix-web18,000
axum18,000
rama18,000
Spring Boot18,000
Express10,333
Bun18,000
323 KB body built per request in responses/s
CandidateValue (responses/s)Lowest pass (responses/s)Highest pass (responses/s)Passes
actix-web18,00018,00018,0003
axum18,00018,00018,0003
rama18,00018,00018,0003
Spring Boot18,00018,00018,0003
Express10,33310,00011,0003
Bun18,00018,00018,0003

Mean of 3 passes per candidate; the whisker spans the lowest and highest pass; the lead over axum, rama, Spring Boot, and Bun is inside the noise.

40 KB JSON

A 263-item JSON document, 40,039 bytes, built and serialized on every request.

actix-web 36,000 responses/s, axum 26,700 responses/s, rama 22,000 responses/s, Spring Boot 15,000 responses/s, Express 20,000 responses/s, Bun 34,700 responses/s

Test 1 40 KB JSON

The mean of each candidate's samples: the statistic the scorecard ranks this section by.

40 KB JSON (responses/s, higher is better)
actix-web36,000
axum26,667
rama22,000
Spring Boot15,000
Express20,000
Bun34,667
40 KB JSON in responses/s
CandidateValue (responses/s)Lowest pass (responses/s)Highest pass (responses/s)Passes
actix-web36,00036,00036,0003
axum26,66726,00028,0003
rama22,00022,00022,0003
Spring Boot15,00015,00015,0003
Express20,00020,00020,0003
Bun34,66732,00036,0003

Mean of 3 passes per candidate; the whisker spans the lowest and highest pass; the lead over Bun is inside the noise.

323 KB JSON

A 2,100-item JSON document, 323,142 bytes, built and serialized on every request.

actix-web 5,000 responses/s, axum 3,330 responses/s, rama 3,250 responses/s, Spring Boot 3,080 responses/s, Express 3,000 responses/s, Bun 4,000 responses/s

Test 1 323 KB JSON

The mean of each candidate's samples: the statistic the scorecard ranks this section by.

323 KB JSON (responses/s, higher is better)
actix-web5,000
axum3,333
rama3,250
Spring Boot3,083
Express3,000
Bun4,000
323 KB JSON in responses/s
CandidateValue (responses/s)Lowest pass (responses/s)Highest pass (responses/s)Passes
actix-web5,0005,0005,0003
axum3,3333,0003,5003
rama3,2503,2503,2503
Spring Boot3,0833,0003,2503
Express3,0003,0003,0003
Bun4,0004,0004,0003

Mean of 3 passes per candidate; the whisker spans the lowest and highest pass.

Slow clients, 323 KB shared body

Peak memory growth with 1,000 keep-alive clients, each paced at 10 Mbit/s with 40 ms added round trip.

actix-web 17.7 MB, axum 28.6 MB, rama 27.7 MB, Spring Boot 102 MB, Express 88 MB, Bun 181 MB, Apache httpd 50.5 MB, nginx 16.9 MB

Test 1 Slow clients, 323 KB shared body

The mean of each candidate's samples: the statistic the scorecard ranks this section by.

Slow clients, 323 KB shared body (MB, lower is better)
actix-web17.7
axum28.6
rama27.7
Spring Boot101.8
Express88.0
Bun181.3
Apache httpd50.5
nginx16.9
Slow clients, 323 KB shared body in MB
CandidateValue (MB)Lowest pass (MB)Highest pass (MB)Passes
actix-web17.717.418.13
axum28.628.528.73
rama27.727.128.13
Spring Boot101.893.8107.23
Express88.084.291.53
Bun181.3177.1186.23
Apache httpd50.550.050.93
nginx16.916.717.13

Mean of 3 passes per candidate; the whisker spans the lowest and highest pass.

Slow clients, 323 KB body built per request

Peak memory growth with 1,000 slow keep-alive clients on the per-request body.

actix-web 250 MB, axum 278 MB, rama 274 MB, Spring Boot 438 MB, Express 355 MB, Bun 216 MB

Test 1 Slow clients, 323 KB body built per request

The mean of each candidate's samples: the statistic the scorecard ranks this section by.

Slow clients, 323 KB body built per request (MB, lower is better)
actix-web250
axum278
rama274
Spring Boot438
Express355
Bun216
Slow clients, 323 KB body built per request in MB
CandidateValue (MB)Lowest pass (MB)Highest pass (MB)Passes
actix-web2502452603
axum2782722813
rama2742682803
Spring Boot4384174623
Express3553463613
Bun2161992273

Mean of 3 passes per candidate; the whisker spans the lowest and highest pass.

Slow clients, 40 KB JSON

Peak memory growth with 1,000 slow keep-alive clients on the 40 KB JSON document.

actix-web 50.5 MB, axum 35.3 MB, rama 32 MB, Spring Boot 829 MB, Express 307 MB, Bun 78.5 MB

Test 1 Slow clients, 40 KB JSON

The mean of each candidate's samples: the statistic the scorecard ranks this section by.

Slow clients, 40 KB JSON (MB, lower is better)
actix-web50.5
axum35.3
rama32.0
Spring Boot829.0
Express307.4
Bun78.5
Slow clients, 40 KB JSON in MB
CandidateValue (MB)Lowest pass (MB)Highest pass (MB)Passes
actix-web50.550.350.53
axum35.333.537.63
rama32.031.133.43
Spring Boot829.0771.8903.63
Express307.4295.0313.93
Bun78.577.080.13

Mean of 3 passes per candidate; the whisker spans the lowest and highest pass.

Slow clients, 323 KB JSON

Peak memory growth with 1,000 slow keep-alive clients on the 323 KB JSON document.

actix-web 197 MB, axum 203 MB, rama 218 MB, Spring Boot 2,030 MB, Express 525 MB, Bun 266 MB

Test 1 Slow clients, 323 KB JSON

The mean of each candidate's samples: the statistic the scorecard ranks this section by.

Slow clients, 323 KB JSON (MB, lower is better)
actix-web197
axum203
rama218
Spring Boot2,033
Express525
Bun266
Slow clients, 323 KB JSON in MB
CandidateValue (MB)Lowest pass (MB)Highest pass (MB)Passes
actix-web1971802083
axum2031982063
rama2182012433
Spring Boot2,0331,8002,1573
Express5255095503
Bun2662532783

Mean of 3 passes per candidate; the whisker spans the lowest and highest pass; the lead over axum and rama is inside the noise.

64 MiB file

64 keep-alive clients downloading a 64 MiB file through each server's own file serving, nothing shaped.

actix-web 49.1 Gbit/s, axum 49.2 Gbit/s, rama 49.1 Gbit/s, Spring Boot 49.1 Gbit/s, Express 38.6 Gbit/s, Bun 49.1 Gbit/s, Apache httpd 49.1 Gbit/s, nginx 49.2 Gbit/s

Test 1 64 MiB file

The mean of each candidate's samples: the statistic the scorecard ranks this section by.

64 MiB file (Gbit/s, higher is better)
actix-web49.1
axum49.2
rama49.1
Spring Boot49.1
Express38.6
Bun49.1
Apache httpd49.1
nginx49.2
64 MiB file in Gbit/s
CandidateValue (Gbit/s)Lowest pass (Gbit/s)Highest pass (Gbit/s)Passes
actix-web49.149.149.13
axum49.249.149.43
rama49.149.049.33
Spring Boot49.149.049.13
Express38.638.239.23
Bun49.149.049.23
Apache httpd49.149.149.23
nginx49.249.249.33

Mean of 3 passes per candidate; the whisker spans the lowest and highest pass; the lead over axum, Apache httpd, rama, and Bun is inside the noise.

Test conditions: rig, corpus, protocol
Rig
Machine
AWS c8gn.4xlarge server, its processes pinned to 4 of 16 cores, and a c8gn.4xlarge client, one cluster placement group
Chip
AWS Graviton4
Cores
4 (server)
Memory
32 GiB each
OS
Ubuntu 24.04 LTS arm64, kernel 7.0.0-1014-aws (arm64)
Runtime
Each server at its documented setup: Rust release builds with rustc 1.100.0, OpenJDK 25.0.5, Node.js 26.13.0, Bun 1.4.4, Apache httpd 2.4.58 and nginx 1.30.6; oha 1.16.0; plain HTTP/1.1 keep-alive, no TLS, 50 Gbps between the instances
Protocol
Warmups
3 unmeasured passes
Measured
3 passes per tool
Process
A fresh server process group per cell on the server's 4 cores, each server sizing its own workers; every server but Bun listens with actix-web's backlog of 1,024 from its own settings, since Bun.serve has none
Cache
JSON built on every request; byte bodies from one shared buffer, or a new one per request on /323k-fresh, while Apache httpd and nginx serve them as files; the 64 MiB file stays in the page cache
Output
Capacity: the highest open-loop rate held with p99 at most 50 ms, at most 0.1% errors and at least 95% delivered, doubling then bisecting three times; CPU per response from the server's user plus system time and peak memory growth from VmHWM, each summed over its processes

What did we learn?

rama 0.4.0 came in behind axum, at 224,000 small-JSON responses a second to axum's 288,000 and Bun's 320,000 and ahead of Spring Boot and Express, and actix-web led small and 323 KB JSON again.

Mean of each section's samples per candidate. The best value in each column is marked in red. A column has no mark when the lead is inside the run's noise, twice the standard error of the difference.
CandidateSmall JSON (K responses/s, higher is better)16 KB body (K responses/s, higher is better)323 KB shared body (responses/s, higher is better)323 KB body built per request (responses/s, higher is better)40 KB JSON (responses/s, higher is better)323 KB JSON (responses/s, higher is better)Slow clients, 323 KB shared body (MB, lower is better)Slow clients, 323 KB body built per request (MB, lower is better)Slow clients, 40 KB JSON (MB, lower is better)Slow clients, 323 KB JSON (MB, lower is better)64 MiB file (Gbit/s, higher is better)
actix-web491352.018,00018,00036,0005,00017.725050.519749.1
axum272352.018,00018,00026,6673,33328.627835.320349.2
rama219330.718,00018,00022,0003,25027.727432.021849.1
Spring Boot128114.718,00018,00015,0003,083101.8438829.02,03349.1
Express10790.713,33310,33320,0003,00088.0355307.452538.6
Bun309266.718,00018,00034,6674,000181.321678.526649.1
Apache httpd–48.018,000–––50.5–––49.1
nginx–352.018,000–––16.9–––49.2

rama spent 16.8 µs of CPU a small-JSON response against axum's 13.1, and on 40 KB JSON it held 22,000 responses a second to axum's 26,000, at 174 µs a response to axum's 151. On 323 KB JSON the two were close: 3,250 against 3,500, at 1,165 and 1,128 µs. On the 16 KB body rama reached the link's 352,000 in one pass and held 320,000 in the other two, where actix-web, axum and nginx held 352,000 in all three. It reached the network's limit on the 323 KB bodies and the file like every server but Express, at 30.4 ms of CPU a download, the same as axum, and with 1,000 slow clients its memory stayed near axum's: 28 MB to 29 on the shared 323 KB body. The seven servers from the first post landed within a capacity step of their numbers then, apart from Spring Boot, whose 40 KB JSON fell from 22,000 to 15,000 responses a second. Medians of three passes; the section lines show means.

What this does not prove

  • The server ran on 4 of a c8gn.4xlarge's 16 Graviton4 cores, with its client on a second c8gn.4xlarge in the same placement group: one instance size, one architecture, plain HTTP/1.1 and no TLS.
  • Every server ran its documented setup without tuning, Spring Boot with no JVM flags. Every server but Bun takes actix-web's listen backlog of 1,024 from its own settings; Bun.serve has no such setting.
  • rama turns on its http-full feature, the one its docs build HTTP servers with, since its default features hold no HTTP, and otherwise runs as shipped: Nagle on, and cleartext HTTP/2 detected on every connection. Its author, Glen De Cauwsemaecker, wrote its server the way rama's examples are (http-servers#13).
  • This is rama 0.4.0, its newest release when it ran; 0.5 hadn't shipped.
  • Apache httpd and nginx serve files, not code, so they sit out the JSON routes and the body built per request.
  • The fastest servers reached the 50 Gbps link on the 16 KB and 323 KB bodies and on the file (46 to 49 Gbit/s), so those routes have no winner; they show who falls short of it.
  • Capacity is found by doubling the offered rate and then bisecting three times, so two servers within an eighth of each other can land on the same step.
  • Apache httpd, at the 150 workers Ubuntu's packaged configuration allows, served the 1,000 slow clients at 1,511 responses a second against about 3,400 for the rest, with a 30-second p99.
  • Three passes, each on a fresh pair of instances. A route has a winner only when the passes' 95% intervals don't overlap.
  • Peak memory growth is VmHWM summed over a server's processes, so Express, Bun, Apache httpd and nginx, which run several, count each one's peak.
  • Against the 2026-11-09 post: the same rig and setups on new instance pairs, a newer Ubuntu image on the same kernel, and rustc 1.100.0 in place of 1.99.1 for the three Rust servers. Spring Boot's 40 KB JSON fell from 22,000 to 15,000 responses a second and its CPU per response rose 11% on both larger JSON routes; its JDK was the same, and nothing the run records explains it.
  • I wrote actix-web #4302 and #4404, the changes in actix-http 3.21.0 that stop copying large response bodies into the write buffer.

Rerun it yourself: the runner and configuration are in the repository, and the methodology page covers what every run holds constant. Think a result is wrong? Open an issue with your rig and your samples.

actix-web is a project of the actix organization. axum is a project of the tokio-rs organization. rama is a project of Plabayo. Spring is a trademark of Broadcom Inc. and/or its subsidiaries. Express and Node.js are projects of the OpenJS Foundation. Bun is part of Anthropic. Apache and Apache HTTP Server are trademarks of The Apache Software Foundation. NGINX is a trademark of F5, Inc. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.