
Elysia or Hono: Let the Deployment Target Decide
Last month I spent an evening rewriting a small API from PHP to TypeScript, and before I installed a single package, one question settled the whole stack: where does this thing run?
The framework shortlist was Elysia or Hono. Speed-first instinct says Elysia: on Bun it benchmarks 2 to 4x faster than Hono in every test I trust, with end-to-end types through Eden Treaty on top. If you deploy to a virtual machine with a long-running process, that instinct is right. Except the API was headed to Cloudflare Workers, where the engine is V8 and Bun does not exist. Enough to change the answer.
Both claims stay true at once, and that is exactly why this question annoyed me for a week. Speed is a property of a framework on a runtime, and you no longer get to pick the runtime after the framework.
Benchmarks answer a question you didn’t ask
The numbers everyone quotes are real. Elysia pushes over five million requests per second on Bun for a trivial route; Hono manages about 1.2 million on the same machine. On Node.js the gap mostly disappears, because those tricks all assume Bun sits underneath. Elysia plugs straight into Bun.serve, uses Bun’s SQLite driver when you want it, and leans into Bun’s internals at every layer it can.
But a benchmark like that tells you how fast a dispatch happens after everything is already warm, running on a server that never restarts. Workers is the exact opposite of that.
The engine is decided for you
Cloudflare Workers runs its code on V8, the Chrome engine, not on Bun or Node. Your bundle is parsed and executed inside an existing browser-grade sandbox, and the platform keeps strict limits on how long that can take. No Bun. No real filesystem. No full Node standard library unless you flip a compatibility flag and accept a partial subset. The APIs you do get are the Web Standards ones, fetch, Request, Response, because this platform was born from running JS at the edge of a CDN.
Mismatches like this come up constantly, and not just with Bun. The Go forums run the same argument: “Use Go, it’s faster.” Then it turns out the API needs edge deployment, or the team writes TypeScript and nobody wants to own Go in production. Once the runtime or the team disagrees, raw speed loses its vote.
On a VM, it’s Elysia, and it’s not close
If the deployment story is a VM, a VPS, or a container on Fly.io or Railway running a long-lived process, take Elysia and go build something.
A warm server is where Elysia’s strengths live. The process starts once and stays hot for weeks, so those per-request races are worth caring about. It talks to Bun.serve directly with no standards-shim in between, does its response serialization through Bun’s own internals, and has the fastest request path in this corner of the ecosystem. Eden Treaty hands you end-to-end types from server to client with no code generation step, which saves real debugging hours nobody puts on a benchmark slide.
Hono on that same VM is still a good framework, still comfortably fast. It’s just not the fastest option, and if fastest is what you came to buy, Elysia is what you came to buy.
That was true for my rewrite too. If the PHP API had been headed to a VPS, its new home would be Elysia on Bun, and this post would be a one-liner instead of an essay. It was headed somewhere else.
Porting Elysia onto that engine: three tax bills
Delete Bun from the deal and every Elysia advantage above stops working. What’s left is a list of extra costs, three of them significant.
The first is bundle size. In a public dry-run test by Afonso Jorge Ramos, deploying the same tiny API to Workers with the two frameworks produced a 155 KiB gzipped bundle for Elysia and a 15 KiB one for Hono. Earlier this month, Cloudflare actually removed its compressed-size deployment limit (the old 3 MB free / 10 MB paid caps were replaced, as of September 2026, with one 64 MiB uncompressed limit), so you will not get rejected for having a big bundle. But that limit was never the real concern. The real cost is startup time, and larger bundles parse slower. The platform still kills workers that take too long to initialize, so the tax shows up as cold-start latency rather than a failed deploy.
The second is the adapter. Elysia needs an experimental CloudflareAdapter, a .compile() call before export, and a specific minimum compatibility date. As of writing, it works and Elysia’s team is genuinely invested in making it work, but the adapter sits off the main path of the framework, and that shows. The default error handler didn’t even run on Workers until a dedicated fix landed in Elysia 1.4.19 in January 2026. Credit where due: the Elysia docs put a list of known Workers limitations at the top of their integration page, not buried in a footnote.
The third is the leaky seams. Some of what Elysia does to get fast, like building validators with new Function through TypeBox, sits on APIs that the Workers sandbox treats differently. That specific issue has been worked around, but from now on you’re crossing fingers that nothing else deep in the stack touches an API Workers dislikes.
Compare what Hono gets you on the same platform:
import { Hono } from 'hono'
const app = new Hono()
app.get('/:name', (c) => {
const db = c.env.DB // your D1 binding, first-class
...
})
export default app
c.env gives you direct access to Cloudflare bindings. Middleware for Workers-specific needs ships officially. The bundle can sit under 15 KiB. That kind of fit is not luck: Hono started out as a library for Cloudflare Workers, in December 2021, and its author Yusuke Wada joined Cloudflare in 2023 and now spends part of his work week on it. Cloudflare runs three of its own API servers on Hono. When the platform changes, Hono’s developer hears about it at the design meeting.
The tradeoff, in the Elysia author’s own words
None of this is a secret, and SaltyAom, who wrote Elysia, was the first to say it out loud. His essay “Hono or Elysia” opens with the blunt version:
“Being support and compatible IS NOT optimized for something.”
He strongly recommends Elysia if you’re deploying on Bun. And about Workers, he says Hono is the framework to beat, because “it originates from a library for Cloudflare Worker.” He then walks through everything Elysia does to try closing that gap, including a plan to compile routes ahead of time so the whole thing avoids dynamic evaluation, and still concludes the Workers gap won’t close.
That’s a framework author telling his own audience the race they keep rerunning is the wrong race. The Elysia docs end up pushing you to run it on Bun. Both projects agree on the answer. The only argument left is between the framework marketing and your deployment plan.
The checklist I now run before picking anything
Speed benchmarks still matter, but they’re further down the list than I used to think. Mine now goes:
- Where will this actually run? Node server, Bun server, edge isolate, Lambda. Different limits, different ceilings, no shared playbook.
- What can’t the platform give me? CPU time per request, cold-start budget, bundle rules, APIs the sandbox blocks. The limits docs teach you more than the framework docs.
- What platform features am I really using here? D1, R2, KV, queues, cron. A framework that speaks them natively beats one you wire through a shim, every single time.
- How fast is it with my handlers in it? The database, the auth check, the JSON serialization: those will eat dispatch microseconds and never think twice. Benchmarks of empty routes flatter frameworks a lot more than production does.
- How ugly is the exit? Portability earns its seat at the table here. Hono’s Web Standards core runs the same code on Workers, Bun, Node, Deno, and Lambda with a one-line adapter change. Elysia keeps a Bun escape hatch too; what you’d lose moving is its Bun-native speed.
Then there’s team familiarity, which isn’t on the list but decides most of these arguments anyway. Nobody wants to be paged at two in the morning for a framework they can’t debug.
The conclusion, given how this actually went
Rewriting the PHP API gave me a clean slate, which turns out to be the easy part. What to put on it was a one-question decision.
If the target had been a VM, Elysia would have been the answer and I’d have stopped there. A long-running warm Bun process is the one environment where microbenchmark speed is honest, Elysia wins those races by more than any real workload can spend, and Eden Treaty plus the plugin ecosystem are bonuses you’ll remember long after you forget the req/s chart. Hono running there is fine, it’s just not what you asked the benchmark for.
But the target was Cloudflare. On Workers the engine is V8, not Bun, and that one line of platform documentation contains the whole argument for Hono. It isn’t that Hono’s dispatch speed wins on its own merits; it’s that Elysia’s speed was never available on this platform to begin with, and everything Elysia needs to compensate is heavy, slow, or experimental there.
So here is the takeaway, for real this time. A framework’s speed race means nothing until you know which engine it’ll be run on. Warm Bun server? Take Elysia, enjoy the headlines. V8 isolate at a CDN edge? Take Hono, and don’t spend the evening you just saved arguing about routers.
Pick the runtime first. The rest of the stack decides itself.
References
- The story of web framework Hono, from the creator of Hono, Yusuke Wada, Cloudflare Blog
- Integrating Elysia with Cloudflare Workers, official Elysia documentation, including its “Known limitations” section
- Hono or Elysia, SaltyAom
- Elysia vs Hono - Comparing Lightweight TypeScript Backend Frameworks, Encore
- Hono vs Elysia for Astro on Cloudflare: What I Chose, Afonso Jorge Ramos (source of the 155 vs 15 KiB bundle figures)
- Deploy larger Workers, up to 64 MiB for both free and paid plans, Cloudflare Changelog, and the current Workers limits