Cold Starts Benchmarks

Cold start metrics has been collected using the http server.

These metrics are also indicative of how well the serverless version performs in this regard, this is because both @mionkit/http an @mionkit/aws are simple wrappers around @mionkit/router which contains all the logic.

  • These metrics show the start time when loading 1 route and then increasing the number or routes loaded until 5,000 routes.
  • The startup time is the time it takes create the routes + initialize the server.
  • The listen time is the time it takes to add all the routes to the server and for the server to be ready listening for requests.

We are comparing mion against fastify as we consider it to be the gold standard in node frameworks and against deepkit as we use some of their libraries and has similar functionalities (validation and serialization).


Benchmarks

  • Machine: darwin x64 | 8 vCPUs | 16.0GB Mem
  • Node: v20.11.0
  • Run: Mon Jan 29 2024 22:28:41 GMT+0000 (Greenwich Mean Time)
  • Method: npm run metrics (samples: 5)
  • startup: time elapsed to setup the application
  • listen: time elapsed until the http server is ready to accept requests (cold start)

Listen time (ms)

Time in (ms) lower is better


Results Table

startup(ms)listen(ms)
10-startup-fastify-routes.js132198
10-startup-mion-routes.js8287
100-startup-fastify-routes.js144293
100-startup-mion-routes.js8288
500-startup-fastify-routes.js217688
500-startup-mion-routes.js8391
1000-startup-fastify-routes.js3271198
1000-startup-mion-routes.js8396
2000-startup-fastify-routes.js5202133
2000-startup-mion-routes.js84106
3000-startup-fastify-routes.js7893235
3000-startup-mion-routes.js85115
5000-startup-fastify-routes.js17496105
5000-startup-mion-routes.js85126
startup-listen.js8286
Benchmarks Repo