- Fastify is a fast and low overhead web framework for Node.js.
- This package shows how fast it is compared to other JS frameworks: these benchmarks do not pretend to represent a real-world scenario, but they give a good indication of the framework overhead.
- The benchmarks are run automatically on GitHub actions, which means they run on virtual hardware that can suffer from the "noisy neighbor" effect; this means that the results can vary.
- For metrics (cold-start) see metrics.md
To be included in this list, the framework should captivate users' interest. We have identified the following minimal requirements:
- Ensure active usage: a minimum of 500 downloads per week
- Maintain an active repository with at least one event (comment, issue, PR) in the last month
- The framework must use the Node.js HTTP module
Clone this repo. Then
node ./benchmark [arguments (optional)]
-h
: Help on how to use the tool.bench
: Benchmark one or more modules.compare
: Get comparative data for your benchmarks.
Create benchmark before comparing;
benchmark bench
You may also compare all test results, at once, in a single table;
benchmark compare -t
You can also extend the comparison table with percentage values based on fastest result;
benchmark compare -p
- Machine: linux x64 | 4 vCPUs | 15.6GB Mem
- Node:
v20.19.5
- Run: Wed Oct 01 2025 01:43:51 GMT+0000 (Coordinated Universal Time)
- Method:
autocannon -c 100 -d 40 -p 10 localhost:3000
(two rounds; one to warm-up, one to measure)
Version | Router | Requests/s | Latency (ms) | Throughput/Mb | |
---|---|---|---|---|---|
node-http | v20.19.5 | ✗ | 45884.8 | 21.30 | 8.18 |
connect | 3.7.0 | ✗ | 45449.6 | 21.51 | 8.11 |
fastify | 5.6.1 | ✓ | 45132.0 | 21.66 | 8.09 |
polka | 0.5.2 | ✓ | 44672.8 | 21.89 | 7.97 |
0http | 4.3.0 | ✓ | 44455.2 | 22.00 | 7.93 |
micro | 10.0.1 | ✗ | 43156.0 | 22.67 | 7.70 |
connect-router | 2.2.0 | ✓ | 41880.8 | 23.38 | 7.47 |
adonisjs | 7.7.0 | ✓ | 41606.4 | 23.53 | 7.42 |
h3 | 1.15.4 | ✗ | 41537.6 | 23.58 | 7.41 |
restana | v5.1.0 | ✓ | 41404.0 | 23.66 | 7.38 |
h3-router | 1.15.4 | ✓ | 39749.6 | 24.66 | 7.09 |
whatwg-node-server | 0.10.12 | ✗ | 38686.4 | 25.36 | 6.90 |
hono | 4.9.9 | ✓ | 36309.0 | 27.04 | 5.96 |
koa | 3.0.1 | ✗ | 33795.8 | 29.09 | 6.03 |
restify | 11.1.0 | ✓ | 33425.2 | 29.42 | 6.02 |
koa-router | 14.0.0 | ✓ | 30156.4 | 32.66 | 5.38 |
hapi | 21.4.3 | ✓ | 30035.2 | 32.78 | 5.36 |
microrouter | 3.1.3 | ✓ | 28637.2 | 34.42 | 5.11 |
srvx | 0.8.9 | ✗ | 19436.4 | 50.92 | 3.78 |
fastify-big-json | 5.6.1 | ✓ | 11273.8 | 88.13 | 129.72 |
express | 5.1.0 | ✓ | 9533.5 | 104.26 | 1.70 |
express-with-middlewares | 5.1.0 | ✓ | 8646.6 | 114.98 | 3.22 |
trpc-router | 11.6.0 | ✓ | 6195.7 | 160.65 | 1.36 |