Skip to Content
getting-startedChoosing Runtime

Last Updated: 3/9/2026


Choosing a Runtime

One of Hono’s superpowers is that the same code runs on any JavaScript runtime. But which one should you choose?

Quick Recommendations

Just getting started? → Use Cloudflare Workers or Bun

Building an API?Cloudflare Workers for edge deployment, Node.js for traditional hosting

Need WebSockets?Cloudflare Workers, Bun, or Deno

Migrating from Express?Node.js for easiest transition

Want the fastest cold starts?Cloudflare Workers or Fastly Compute

Need to serve static files?Bun, Deno, or Cloudflare Pages

Runtime Comparison

RuntimeCold StartPerformanceFree TierWebSocketsStatic Files
Cloudflare Workers⚡ <1ms🚀 Excellent✅ 100k req/day✅ YesVia Pages
Cloudflare Pages⚡ <1ms🚀 Excellent✅ Unlimited❌ No✅ Built-in
Bun⚡ Instant🚀 ExcellentN/A (self-host)✅ Yes✅ Built-in
Deno⚡ <10ms🏃 Great✅ 100k req/month✅ Yes✅ Built-in
Fastly Compute⚡ <1ms🚀 Excellent✅ 50k req/month❌ No❌ No
AWS Lambda🐌 100ms-1s🏃 Good✅ 1M req/month❌ No❌ No
Vercel🐌 Varies🏃 Good✅ 100k req/month❌ No✅ Built-in
Node.js⚡ Instant🏃 GoodN/A (self-host)✅ Via adapter✅ Via middleware

Runtime Details

Cloudflare Workers

Best for: Edge APIs, global applications, high-traffic services

Pros:

  • ⚡ Sub-millisecond cold starts
  • 🌍 Deployed to 300+ locations worldwide
  • 💰 Generous free tier (100,000 requests/day)
  • 🔥 Excellent performance
  • 🔐 Built-in KV storage, D1 database, R2 object storage
  • ✅ WebSocket support

Cons:

  • 📦 10MB script size limit (usually not an issue)
  • ⏱️ 50ms CPU time on free tier (enough for most APIs)
  • 🎓 Slight learning curve for Workers-specific APIs

When to choose:

  • You need global, low-latency APIs
  • You want generous free tier
  • You’re building a high-scale application

Get started: Cloudflare Workers Guide

Bun

Best for: Local development, self-hosted APIs, full-stack apps

Pros:

  • ⚡ Extremely fast runtime (3x faster than Node.js)
  • 🔨 All-in-one tool (runtime, bundler, test runner, package manager)
  • 📦 Built-in TypeScript support
  • ✅ WebSocket support
  • 🗂️ Native static file serving
  • 🔄 Hot reload out of the box

Cons:

  • 🆕 Relatively new (may have occasional bugs)
  • 🏠 Self-hosting required
  • 📚 Smaller ecosystem than Node.js

When to choose:

  • You’re self-hosting
  • You want blazing-fast local development
  • You need a modern, all-in-one toolchain

Get started: Bun Guide

Deno

Best for: Secure applications, TypeScript-first projects

Pros:

  • 🔒 Secure by default (explicit permissions)
  • 📘 First-class TypeScript support
  • 🌐 Web Standards throughout
  • ✅ WebSocket support
  • 🗂️ Native static file serving
  • ☁️ Deno Deploy for edge hosting

Cons:

  • 📦 Different module system (URL imports)
  • 🏠 Smaller ecosystem than Node.js
  • 🎓 Learning curve if coming from Node.js

When to choose:

  • Security is a top priority
  • You prefer TypeScript
  • You want Web Standards everywhere

Get started: Deno Guide

Node.js

Best for: Traditional hosting, migrating from Express, enterprise environments

Pros:

  • 📚 Massive ecosystem (npm)
  • 🏢 Widely adopted in enterprises
  • 🔄 Easy migration from Express
  • 🛠️ Mature tooling
  • ✅ WebSocket support (via adapter)

Cons:

  • 🐌 Slower than Bun/Deno
  • 🏠 Self-hosting or traditional cloud required
  • 📦 Not as edge-friendly as Workers/Deno Deploy

When to choose:

  • You’re migrating from Express
  • You need access to the npm ecosystem
  • You’re deploying to traditional infrastructure

Get started: Node.js Guide

AWS Lambda

Best for: AWS-centric architectures, serverless applications

Pros:

  • ☁️ Integrates with AWS services
  • 💰 Pay-per-use pricing
  • 📈 Auto-scaling
  • 🎁 Generous free tier (1M requests/month)

Cons:

  • 🐌 Cold starts (100ms-1s)
  • 🌍 Not edge-deployed (regional)
  • 🎓 AWS-specific configuration
  • ❌ No WebSocket support (use API Gateway WebSocket)

When to choose:

  • You’re already using AWS
  • You need integration with AWS services (DynamoDB, S3, etc.)
  • Regional deployment is acceptable

Get started: AWS Lambda Guide

Vercel

Best for: Full-stack Next.js apps, frontend-heavy projects

Pros:

  • 🚀 Zero-config deployment
  • 🎨 Great for full-stack apps
  • 🌐 Edge Functions available
  • 🗂️ Static file serving built-in

Cons:

  • 💰 Expensive at scale
  • 🔒 Some vendor lock-in
  • ⏱️ Execution time limits

When to choose:

  • You’re building a full-stack app with Next.js
  • You want zero-config deployment
  • Cost at scale isn’t a concern

Get started: Vercel Guide

Cloudflare Pages

Best for: Static sites with API routes, JAMstack apps

Pros:

  • 🗂️ Built-in static file hosting
  • ⚡ Edge Functions for dynamic routes
  • 💰 Unlimited free tier
  • 🌍 Global CDN

Cons:

  • ❌ No WebSocket support
  • 🎯 Best suited for static-first apps

When to choose:

  • You’re building a static site with some dynamic routes
  • You want free, unlimited hosting
  • You don’t need WebSockets

Get started: Cloudflare Pages Guide

Fastly Compute

Best for: Edge computing, CDN applications

Pros:

  • ⚡ Sub-millisecond cold starts
  • 🌍 Global edge network
  • 🔥 Excellent performance

Cons:

  • 🎓 Steeper learning curve
  • 💰 Pricing can be complex
  • ❌ No WebSocket support

When to choose:

  • You need cutting-edge performance
  • You’re building CDN-level applications
  • You’re already using Fastly

Get started: Fastly Compute Guide

Decision Tree

Start here | ├─ Need global, low-latency API? │ ├─ Yes → Cloudflare Workers │ └─ No ↓ | ├─ Self-hosting? │ ├─ Yes │ │ ├─ Want fastest performance? → Bun │ │ ├─ Need security focus? → Deno │ │ └─ Migrating from Express? → Node.js │ └─ No ↓ | ├─ Using AWS already? │ ├─ Yes → AWS Lambda │ └─ No ↓ | ├─ Building full-stack app? │ ├─ With Next.js? → Vercel │ ├─ Static + API? → Cloudflare Pages │ └─ API-first? → Cloudflare Workers | └─ Default → Cloudflare Workers (best free tier + performance)

Can I Switch Later?

Yes! That’s the beauty of Hono.

Your core application code doesn’t change when switching runtimes. Only the entry point and platform-specific features differ.

Example - Same app, different runtimes:

// app.ts - works everywhere import { Hono } from 'hono' const app = new Hono() app.get('/', (c) => c.text('Hello!')) export default app
// Cloudflare Workers entry export default app
// Bun entry export default { port: 3000, fetch: app.fetch, }
// Node.js entry import { serve } from '@hono/node-server' serve(app)

Platform-specific features (like WebSockets or static files) may require small changes, but your routing, middleware, and business logic remain identical.

What’s Next?