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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
- 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
- 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
| Candidate | Small 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-web | 491 | 352.0 | 18,000 | 18,000 | 36,000 | 5,000 | 17.7 | 250 | 50.5 | 197 | 49.1 |
| axum | 272 | 352.0 | 18,000 | 18,000 | 26,667 | 3,333 | 28.6 | 278 | 35.3 | 203 | 49.2 |
| rama | 219 | 330.7 | 18,000 | 18,000 | 22,000 | 3,250 | 27.7 | 274 | 32.0 | 218 | 49.1 |
| Spring Boot | 128 | 114.7 | 18,000 | 18,000 | 15,000 | 3,083 | 101.8 | 438 | 829.0 | 2,033 | 49.1 |
| Express | 107 | 90.7 | 13,333 | 10,333 | 20,000 | 3,000 | 88.0 | 355 | 307.4 | 525 | 38.6 |
| Bun | 309 | 266.7 | 18,000 | 18,000 | 34,667 | 4,000 | 181.3 | 216 | 78.5 | 266 | 49.1 |
| Apache httpd | – | 48.0 | 18,000 | – | – | – | 50.5 | – | – | – | 49.1 |
| nginx | – | 352.0 | 18,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.