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 '@mionkit/core';
import {RouterOptions, initMionRouter, headersFn, middleFn, route} from '@mionkit/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;
Bun servers are excluded!
Bun servers (mion.bun, hono.bun, elysia.bun) are excluded from the hello world benchmarks because the benchmarking tool used (autocannon) is not fast enough to accurately measure Bun's performance.

Benchmarks

  • Machine: darwin arm64 | 12 vCPUs | 16.0GB Mem
  • Node: v24.13.0
  • Run: Fri Feb 27 2026 01:04:50 GMT+0000 (Greenwich Mean Time)
  • Method: autocannon -c 100 -d 20.01 -p 10 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
http-node16.18.0127536.07.4322.74146108bare node http server with Zod validation
mion0.6.2112435.28.3121.98224108Automatic validation and serialization out of the box
hono3.12.6104310.49.0717.11231108hono node server with Zod validation
hapi21.4.489321.610.7415.93253111Hapi with Zod validation
fastify5.7.486547.210.9915.52156108Fastify with native JSON Schema validation
express5.2.175843.212.7013.52236109Express with Zod validation
Benchmarks Repo