Performance benchmarks comparing Kito against popular Node.js web frameworks.
Note: Benchmarks are automatically updated on each release.
- Kito - High-performance TypeScript framework written in Rust
- Fastify - Fast and low overhead web framework
- Hono - Fast web framework for the edge
- Express - Fast, unopinionated web framework
- Koa - Expressive middleware framework
- Restify - REST API framework
- TinyHTTP - Lightweight Express-like framework
- Hapi - Rich framework for building applications
{
connections: 100,
pipelining: 10,
duration: 30, // seconds
workers: undefined // auto
}All frameworks are tested with a simple "Hello World" endpoint to measure raw performance.
pnpm installpnpm bench:run basicThis will:
- Start each framework on sequential ports (3000, 3001, ...)
- Run wrk load tests
- Generate comparison charts
- Save detailed results to
results/data/
Some framework adapters only work on Node.js while others can run under Bun. You can pin the runtime per framework in config.ts:
frameworks: [
{ name: "kito", runtime: "bun" },
{ name: "elysia", runtime: "bun" },
{ name: "restify", runtime: "node" },
"koa", // uses whichever runtime you launch the runner with
];- Default (string) entries execute inside the same runtime that starts
runBench.ts. runtime: "bun"executes viapnpm dlx bun run ..., so make surepnpmis available (it will download Bun on demand).runtime: "node"executes viapnpm dlx tsx ..., so no local CLI install is required beyondpnpm.
bench/
├── cases/
│ └── basic/ # Basic "Hello World" benchmarks
│ ├── kito.ts
│ ├── fastify.ts
│ ├── express.ts
│ └── ...
├── results/
│ ├── charts/ # Generated benchmark charts
│ └── data/ # Raw JSON results
├── utils/
│ ├── http.ts # Wrk runner
│ └── chart.ts # Chart generation
├── config.ts # Benchmark configuration
└── runBench.ts # Main benchmark runner
- Requests/sec - Average requests per second
- Latency (ms) - Average response time in milliseconds
- Throughput (bytes/sec) - Average data throughput
- Create a new folder in
cases/(e.g.,cases/routing/) - Add framework implementations following the pattern:
export function start(port: number): { stop: () => void } {
const app = createServer();
app.get("/", handler);
app.listen(port);
return {
stop: async () => app.close(),
};
}- Run your benchmark:
pnpm bench:run routingNumber of requests the server can handle per second.
Time taken to receive a response. Includes network and processing time.
Amount of data transferred per second.
Edit config.ts to customize:
export default {
frameworks: ["kito", "fastify", "hono", ...],
connections: 100, // Concurrent connections
pipelining: 10, // Requests per connection
duration: 30, // Test duration in seconds
chart: {
enabled: true,
output: "results/charts/result.png"
}
};- All tests run on the same machine with identical conditions
- Each framework uses its recommended setup and defaults
- Tests measure only the framework overhead, not business logic
- Results are averaged over the test duration
- Benchmarks are indicative and may vary based on hardware
- Real-world performance depends on application complexity
- These tests measure raw throughput, not production scenarios
- All frameworks are excellent choices for different use cases
Found an issue with the benchmarks? Want to add a new framework?
- Fork the repository
- Add your changes
- Run the benchmarks locally
- Submit a pull request
Licensed under the MIT License.
