Benchmarks HTTP servers

Candidates

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

Tick the candidates you care about and the charts, winners and table redraw for just them: same run, same rig, same samples. Winners come from the numbers alone; the story is in the post.

Small JSON

Winner actix-web (491 K 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

Tie actix-web (352.0 K responses/s), axum (352.0 K responses/s), nginx (352.0 K responses/s), and rama (330.7 K responses/s), inside this run's noise

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

Tie actix-web (18,000 responses/s), axum (18,000 responses/s), rama (18,000 responses/s), Spring Boot (18,000 responses/s), Bun (18,000 responses/s), Apache httpd (18,000 responses/s), and nginx (18,000 responses/s), inside this run's noise

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

Tie actix-web (18,000 responses/s), axum (18,000 responses/s), rama (18,000 responses/s), Spring Boot (18,000 responses/s), and Bun (18,000 responses/s), inside this run's noise

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

Tie actix-web (36,000 responses/s) and Bun (34,667 responses/s), inside this run's noise

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

Winner actix-web (5,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

Winner 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

Winner 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

Winner rama (32.0 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

Tie actix-web (197 MB), axum (203 MB), and rama (218 MB), inside this run's noise

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

Tie nginx (49.2 Gbit/s), axum (49.2 Gbit/s), Apache httpd (49.1 Gbit/s), rama (49.1 Gbit/s), and Bun (49.1 Gbit/s), inside this run's noise

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

Scorecard

Mean of each section's samples for the candidates you picked. 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

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.