Benchmarks

Hello World

Performance benchmarks for a simple Hello World endpoint.

These benchmarks are based on the fastify benchmarks repo! in fact our goal is to perform similar to fastify as we considered it the industry standard in terms of performance.

mion is focused on being lightweight and fast so it can be run in serverless environments. We run the benchmarks before every PR gets merged to ensure there is no performance regression.

Hello World benchmark involves mostly routing as there is no validation and is about as fast as each framework can get.

What is tested?

This is a simple hello world scenario, is a good indicator of the router performance and theoretical upper limit of each framework.

import {HeadersSubset, RpcError} from '@mionjs/core';
import {RouterOptions, initMionRouter, headersFn, middleFn, route} from '@mionjs/router';

export type User = {id: string; name: string; surname: string};

// set options and init router
export const routerOptions: Partial<RouterOptions> = {prefix: 'api/v1'};
export const myApi = await initMionRouter(
    // all function parameters will be automatically validated before the function is called
    {
        auth: headersFn((ctx, h: HeadersSubset<'Authorization'>): void | RpcError<'not-authorized'> => {
            const token = h.headers.Authorization;
            if (!token) return new RpcError<'not-authorized'>({publicMessage: 'Not Authorized', type: 'not-authorized'});
        }),
        users: {
            sayHello: route((ctx, user: User): string => `Hello ${user.name} ${user.surname}`),
        },
        log: middleFn((ctx): void => console.log(Date.now(), ctx.path, ctx.response.statusCode), {runOnError: true}),
    },
    routerOptions
);

// Export the type of the Api (used by the client)
export type MyApi = typeof myApi;

Benchmarks

  • Machine: darwin arm64 | 12 vCPUs | 16.0GB Mem
  • Node: v24.13.0
  • Run: Wed Apr 15 2026 22:04:55 GMT+0100 (Irish Standard Time)
  • Method: autocannon -c 100 -d 20.099952 -p 1 localhost:3000 (two rounds; one to warm-up, one to measure)

Req (R/s)

Throughput (Mb/s)

Latency (ms)

Max Memory (Mb)

Memory Series (MB)

Results Table

VersionRouterReq (R/s)Latency (ms)Output (Mb/s)Max Memory (Mb)Max Cpu (%)ValidationDescription
elysia.bun1.0.0124499.50.7714.8455109Elysia framework with TypeBox validation
hono.bun3.12.6110404.70.8713.1667109hono bun server with Zod validation
mion.bun0.6.2101825.00.9415.2560109mion using bun, automatic validation and serialization
http-node16.18.084535.91.1415.08133114bare node http server with Zod validation
mion0.6.273443.01.3214.29139114Automatic validation and serialization out of the box
hono3.12.673011.91.3311.98145114hono node server with Zod validation
fastify5.7.459551.21.6310.68144104Fastify with native JSON Schema validation
hapi21.4.458388.51.6610.41219108Hapi with Zod validation
express5.2.156729.91.7110.12151106Express with Zod validation
Benchmarks Repo