These benchmarks are based on the Fastify benchmarks repo. Our goal is to perform similarly to Fastify as we consider it the industry standard in terms of performance.
The test consists of an updateSimpleUser request with a simple User model (~100 bytes payload) that includes:
interface SimpleUser {
id: number;
name: string;
surname: string;
lastUpdate: Date;
}
// ### mion ###
// the received user by the route is already validated and deserialized
// all Date fields are already JS Date objects (not strings from JSON.parse)
export const routes: Routes = {
updateUser: (ctx, user: SimpleUser): SimpleUser => {
user.lastUpdate = new Date();
return user;
},
};
// ### Other frameworks (Express, Fastify, Hono, etc.) ###
// Use Zod schemas for validation and date coercion
const UserSchema = z.object({
id: z.number(),
name: z.string(),
surname: z.string(),
lastUpdate: z.coerce.date(),
});
app.post("/updateUser", function (req, res) {
const user = UserSchema.parse(req.body); // Validates + deserializes dates
user.lastUpdate = new Date();
res.json(user);
});
We can observe how in this benchmark the requests take more time compared with the 'hello world' benchmark. This is mostly because each request is spending extra time on validation and serialization.
For this specific test, the performance of the libraries used for validation and serialization might be as important than the routing and framework itself.
http-node is a bare http.createServer with zero framework overhead and it's fully synchronous handler avoids the microtask scheduling cost that async/await adds to frameworks like Hono bun. Notice that Bun servers only reach ~92-98% CPU utilization versus ~100-109% for http-node, suggesting an I/O or scheduling bottleneck rather than a raw speed advantage.v24.13.0autocannon -c 100 -d 20.10033 -p 1 localhost:3000 (two rounds; one to warm-up, one to measure)| Version | Router | Req (R/s) | Latency (ms) | Output (Mb/s) | Max Memory (Mb) | Max Cpu (%) | Validation | Description | |
|---|---|---|---|---|---|---|---|---|---|
| elysia.bun | 1.0.0 | ✓ | 82502.3 | 1.16 | 15.81 | 89 | 108 | ✓ | Elysia framework with TypeBox validation |
| hono.bun | 3.12.6 | ✓ | 79744.7 | 1.20 | 15.28 | 71 | 109 | ✓ | hono bun server with Zod validation |
| mion.bun | 0.6.2 | ✓ | 73772.7 | 1.30 | 17.93 | 64 | 108 | ✓ | mion using bun, automatic validation and serialization |
| http-node | 16.18.0 | ✗ | 59640.9 | 1.63 | 14.95 | 136 | 115 | ✓ | bare node http server with Zod validation |
| mion | 0.6.2 | ✓ | 55432.8 | 1.76 | 15.96 | 142 | 101 | ✓ | Automatic validation and serialization out of the box |
| fastify | 5.7.4 | ✓ | 41002.8 | 2.41 | 10.32 | 254 | 125 | ✓ | Fastify with native JSON Schema validation |
| express | 5.2.1 | ✓ | 40209.3 | 2.43 | 10.08 | 173 | 108 | ✓ | Express with Zod validation |
| hapi | 21.4.4 | ✓ | 35953.5 | 2.75 | 9.01 | 223 | 110 | ✓ | Hapi with Zod validation |
| hono | 3.12.6 | ✓ | 30677.7 | 4.23 | 7.25 | 1089 | 148 | ✓ | hono node server with Zod validation |