Skip to content

Latest commit

 

History

History
106 lines (86 loc) · 6.29 KB

README.md

File metadata and controls

106 lines (86 loc) · 6.29 KB

CI Package Manager CI Web SIte neostandard javascript style CII Best Practices

NPM version NPM downloads Security Responsible Disclosure Discord Contribute with Gitpod Open Collective backers and sponsors


TL;DR

  • 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

Requirements

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

Usage

Clone this repo. Then

node ./benchmark [arguments (optional)]

Arguments

  • -h: Help on how to use the tool.
  • compare: Get comparative data for your benchmarks.

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

Benchmarks

  • Machine: linux x64 | 4 vCPUs | 15.6GB Mem
  • Node: v20.20.2
  • Run: Mon Nov 16 2026 05:57:43 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
fastify 5.12.8 ✓ 45512.8 21.47 8.16
bare v20.20.2 ✗ 45137.6 21.67 8.05
polka 0.5.2 ✓ 45074.2 21.68 8.04
frourio 1.3.1 ✓ 44900.8 21.78 8.05
connect 3.7.0 ✗ 44839.2 21.81 8.00
rayo 1.4.6 ✓ 44317.8 22.07 7.90
server-base 7.1.32 ✗ 43962.4 22.24 7.84
server-base-router 7.1.32 ✓ 43895.2 22.29 7.83
micro 10.0.1 ✗ 43121.4 22.69 7.69
polkadot 1.0.0 ✗ 42532.8 23.01 7.58
connect-router 1.3.8 ✓ 41745.6 23.47 7.44
micro-route 2.5.0 ✓ 41432.0 23.65 7.39
0http 4.4.0 ✓ 41055.8 23.86 7.32
adonisjs 7.8.1 ✓ 40407.2 24.25 7.21
h3 1.15.11 ✗ 39259.8 24.97 7.00
restana v5.2.0 ✓ 38894.8 25.21 6.94
hono 4.13.18 ✓ 37416.2 26.22 6.14
h3-router 1.15.11 ✓ 37228.8 26.36 6.64
koa 2.16.4 ✗ 34401.2 28.56 6.13
restify 11.1.0 ✓ 34270.6 28.67 6.18
take-five 2.0.0 ✓ 33861.2 29.02 12.17
koa-isomorphic-router 1.0.1 ✓ 33708.0 29.17 6.01
koa-router 13.1.1 ✓ 32313.4 30.45 5.76
hapi 21.4.13 ✓ 30378.4 32.41 5.42
microrouter 3.1.3 ✓ 28809.6 34.21 5.14
fastify-big-json 5.12.8 ✓ 12035.4 82.54 138.48
express 5.3.0 ✓ 10342.8 96.11 1.84
frourio-express 1.3.1 ✓ 9981.8 99.58 1.78
express-with-middlewares 5.3.0 ✓ 8577.3 115.96 3.19
trpc-router 10.45.4 ✓ N/A N/A N/A