Encore.ts vs Hono vs Elysia: Speed 2026
Encore.ts vs Hono vs Elysia: Speed 2026
TL;DR
Encore.ts makes a bold claim: a Rust-powered runtime delivering 9x the throughput of Express and, in its own benchmarks, 3x faster than Hono and Elysia. The reality is more nuanced — Elysia 1.4+ on Bun has closed the gap and, in some benchmarks, now outperforms Encore. But Encore.ts isn't just a fast HTTP router: it's an opinionated full-stack TypeScript backend with automatic infrastructure, distributed tracing, and a structured service model. The right choice depends on whether you want raw throughput or a complete backend platform.
Key Takeaways
- Encore.ts Rust runtime — offloads I/O, request parsing, and DB queries to a Rust layer, freeing Node.js for pure business logic
- 9x faster than Express — consistent across benchmarks with and without validation
- Elysia 1.4 fights back — with Bun runtime, Elysia now matches or exceeds Encore in raw req/s in some published benchmarks
- Hono is the multi-runtime choice — runs on Node.js, Bun, Deno, Cloudflare Workers, and AWS Lambda
- Encore.ts is more than a framework — automatic cloud infrastructure, Encore Cloud, and distributed tracing are bundled
- Benchmark caveats — synthetic benchmarks diverge from real-world DB-heavy workloads where differences shrink
The Frameworks
Encore.ts
Encore.ts (encore.dev) takes a fundamentally different approach to performance: instead of optimizing the JavaScript layer, it replaces it for I/O-heavy work with a Rust runtime.
// Encore.ts uses a service-oriented model, not just middleware
import { api } from "encore.dev/api";
import { SQLDatabase } from "encore.dev/storage/sqldb";
const db = new SQLDatabase("users", {
migrations: "./migrations",
});
// This endpoint is automatically traced, type-safe, and validated
export const getUser = api(
{ expose: true, method: "GET", path: "/users/:id" },
async ({ id }: { id: string }) => {
const user = await db.queryRow`SELECT * FROM users WHERE id = ${id}`;
return { user };
}
);
The Rust runtime handles: HTTP parsing, TLS, request routing, schema validation, database connection pooling, and distributed tracing. The Node.js event loop only runs your TypeScript business logic.
GitHub: ~14K stars | npm: encore.dev
Hono
Hono (hono.dev) is a lightweight Web Standards-based router that runs on any JavaScript runtime. Its tagline: "Fast, lightweight, built on Web Standards. Support for any JavaScript runtime."
import { Hono } from "hono";
import { zValidator } from "@hono/zod-validator";
import { z } from "zod";
const app = new Hono();
app.get(
"/users/:id",
zValidator("param", z.object({ id: z.string() })),
async (c) => {
const { id } = c.req.valid("param");
return c.json({ id, name: "Alice" });
}
);
export default app;
// Same code runs on: Node.js, Bun, Deno, Cloudflare Workers, AWS Lambda Edge
GitHub: 22K+ stars | npm: hono
Elysia
Elysia (elysiajs.com) is built specifically for Bun. It leverages Bun's native I/O and uses macro-based type inference for zero-overhead schema validation via Eden (its type-safe client).
import { Elysia, t } from "elysia";
const app = new Elysia()
.get("/users/:id", ({ params: { id } }) => ({
id,
name: "Alice"
}), {
params: t.Object({
id: t.String()
})
})
.listen(3000);
// Eden provides end-to-end type safety — no codegen needed
export type App = typeof app;
GitHub: 11K stars | npm: elysia
Fastify
Fastify (fastify.dev) is the established Node.js performance leader — battle-tested, massive plugin ecosystem, 2-3x faster than Express.
import Fastify from "fastify";
import { Type } from "@sinclair/typebox";
const fastify = Fastify({ logger: true });
fastify.get<{ Params: { id: string } }>(
"/users/:id",
{
schema: {
params: Type.Object({ id: Type.String() }),
},
},
async (request) => {
return { id: request.params.id, name: "Alice" };
}
);
fastify.listen({ port: 3000 });
GitHub: 32K stars | npm: fastify
Benchmark Data (2026)
Published Benchmarks: Encore vs Elysia vs Hono vs Fastify
From the Encore team's ts-benchmarks repo (github.com/encoredev/ts-benchmarks), using 150 concurrent workers, 10s runs, oha load tester:
Without validation (routing only):
| Framework | Runtime | Req/s |
|---|---|---|
| Encore.ts | Node.js (Rust I/O) | ~85,000 |
| Elysia 1.4 | Bun | ~71,200 |
| Hono | Bun | ~62,200 |
| Fastify | Node.js | ~15,700 |
| Express | Node.js | ~9,400 |
With schema validation:
| Framework | Runtime | Req/s |
|---|---|---|
| Encore.ts | Node.js (Rust I/O) | ~78,000 |
| Hono + TypeBox | Bun | ~48,400 |
| Elysia + t | Bun | ~33,150 |
| Fastify + Ajv | Node.js | ~11,878 |
| Express + zod | Node.js | ~5,200 |
Elysia's Counter-Benchmark
The Elysia team published their own benchmark (elysiajs.com/blog/elysia-v-encore) showing that after 1.5 years of development, Elysia now matches or exceeds Encore on Bun in the same benchmark conditions.
The divergence comes from methodology: Encore benchmarks often use Node.js for Encore (where its Rust runtime shines) while Elysia is tested on Bun (its native target). When both run on Node.js, Encore wins. When both run on Bun, the gap disappears or reverses.
Real-World Context
Synthetic benchmarks measure routing throughput. Real applications are dominated by database I/O and business logic, where these differences shrink:
| Workload | Practical difference |
|---|---|
| JSON echo (pure routing) | 5-9x vs Express |
| Database-backed API (simple queries) | 2-3x vs Express |
| Complex queries + auth middleware | 1.2-1.5x vs Express |
Architectural Differences: Beyond Throughput
Encore.ts: Backend Platform
Encore.ts is opinionated — it's not just a router, it's a backend framework with infrastructure:
Auto-provisioned infrastructure:
// Encore auto-creates the database, queue, and cache based on your code
import { SQLDatabase } from "encore.dev/storage/sqldb";
import { PubSub } from "encore.dev/pubsub";
import { CacheCluster } from "encore.dev/cache";
const db = new SQLDatabase("mydb", { migrations: "./migrations" });
const events = new PubSub.Topic("user-events");
const cache = new CacheCluster("sessions", { eviction: "allkeys-lru" });
Encore provisions these resources in local dev (via Docker), staging, and production cloud (Encore Cloud, AWS, or GCP) — all from the same TypeScript declarations.
Distributed tracing built-in: Every API call, database query, and pub/sub message is traced automatically in Encore's dashboard.
Hono: Multi-Runtime Portability
Hono's superpower is environment portability:
// The same Hono app runs everywhere:
import { Hono } from "hono";
import { handle } from "hono/aws-lambda";
const app = new Hono();
app.get("/", (c) => c.text("Hello!"));
// Node.js
import { serve } from "@hono/node-server";
serve(app);
// Cloudflare Workers
export default app;
// AWS Lambda
export const handler = handle(app);
// Bun
Bun.serve({ fetch: app.fetch });
No other framework matches this runtime portability. For teams deploying to edge networks, serverless, and traditional servers from the same codebase, Hono is the pragmatic choice.
Elysia: Bun-Native DX
Elysia's Eden plugin provides end-to-end type safety between server and client without a code generation step:
// Server (Elysia)
const app = new Elysia()
.get("/users/:id", ({ params }) => ({
id: params.id,
name: "Alice"
}));
// Client (Eden) — fully type-safe, no codegen
import { treaty } from "@elysiajs/eden";
const client = treaty<typeof app>("localhost:3000");
const { data, error } = await client.users({ id: "1" }).get();
// data is typed as { id: string, name: string }
This DX is comparable to tRPC but without the query/mutation distinction — it's just HTTP with types.
When to Choose Each
Choose Encore.ts when:
- You're building a new backend service and want batteries-included infrastructure
- You need distributed tracing and observability without configuring OpenTelemetry manually
- Your team wants to deploy to multiple cloud providers without learning Terraform
- You're on Node.js (not Bun) and want the best performance
Choose Hono when:
- You need to run on edge/serverless (Cloudflare Workers, Vercel Edge, AWS Lambda@Edge)
- You want multi-runtime portability — same code deploys anywhere
- You prefer a minimal, Express-like API with modern TypeScript support
- Bundle size matters (Hono core is tiny)
Choose Elysia when:
- You're all-in on Bun and want the best DX
- You need end-to-end type safety without codegen (Eden)
- Your team prioritizes raw performance on Bun
- You're comfortable adopting two cutting-edge technologies simultaneously (Bun + Elysia)
Choose Fastify when:
- You need a battle-tested Node.js framework with a proven plugin ecosystem
- You're migrating from Express and want a familiar model with better performance
- Your team is risk-averse about frameworks in active beta development
Quick Performance Summary
Node.js only:
Express: ████░░░░░░░░░░ (baseline)
Fastify: ████████████░░ (~2-3x Express)
Encore.ts: ██████████████ (~9x Express, Rust runtime)
With Bun:
Hono: ████████████░░ (~6x Express baseline)
Elysia: ██████████████ (~7-8x Express baseline, varies by test)
The "9x faster than Express" claim is accurate for Encore in Node.js environments. On Bun, Elysia and Hono close the gap significantly.
Methodology
- Sources: encoredev/ts-benchmarks (GitHub), encore.dev/blog/event-loops (Rust event loop post), elysiajs.com/blog/elysia-v-encore (Elysia counter-benchmark), betterstack.com/community/guides/scaling-nodejs/fastify-vs-express-vs-hono/, hono.dev/docs/concepts/benchmarks, encore.dev/articles/best-typescript-backend-frameworks-2026
- Benchmarks: 150 concurrent workers, 10s runs, oha load tester
- Data as of: March 2026
Comparing TypeScript API frameworks? See also Hono vs Elysia 2026: The Bun-Era Backend Frameworks and Hono RPC vs tRPC vs ts-rest 2026.
Using Encore.ts for cloud-native backends? Compare Encore vs Nitric vs Shuttle 2026.