Moving our SaaS API from Node.js + Express + Prisma to this stack wasn't smooth, but the results were worth it. AWS bills went way down, cold starts went from fucking forever to actually usable. Not sure on exact numbers but it's night and day. Here's the real story, including the bullshit they don't warn you about.
Yeah, the benchmarks aren't bullshit for once - Bun actually delivers about 4x the HTTP throughput vs Node.js.
Bun: Fast as Hell But Documentation Sucks
Latest Bun is legitimately fast - our API response times dropped way down. The recent releases bring way better Node.js compatibility and built-in S3 support. But getting there was a nightmare. The official documentation is sparse, and Stack Overflow has barely any Bun questions compared to Node.js.
The real-world testing actually backs this up - rare for benchmark articles to not be complete bullshit. Bun pushes like 50k+ req/sec or something, way better than Node.js.
What Actually Breaks:
sharp
package completely shits the bed - use@squoosh/lib
insteadbcrypt
doesn't compile - switch toargon2
- Hot reload randomly stops working and you have to restart everything
- Some npm packages just refuse to install (looking at you,
node-canvas
)
What Actually Works:
- TypeScript runs without any build step bullshit
- Bundles shrink like crazy, probably cut them in half
- Cold starts on Lambda went from 2.5s to 400ms consistently
- Single binary deployment is stupidly simple
The package ecosystem is tiny. I keep a compatibility list of what works and what doesn't because honestly, the official tracking is about as reliable as a chocolate teapot. The Bun compatibility tracker is community-maintained and way more reliable than the official docs - it's maintained by people who actually use this stuff and it's way more accurate about what's broken.
Hono: Actually Good But Missing Ecosystem
Hono's documentation is actually well-written, unlike most JavaScript frameworks. Version 4 (released February 2024) added static site generation and client components, but for API work, the middleware system makes sense and TypeScript integration doesn't fight you every step of the way. The Hono GitHub repository shows active development with daily commits.
Production Reality Check:
- Deployed identically to Cloudflare Workers and AWS Lambda without code changes
- Our bundle shrunk like crazy, was some huge Express mess before
- Built-in Zod validation caught schema errors that would've hit production
- OpenAPI generation actually works (looking at you, Swagger/Express setup)
Pain Points Nobody Mentions:
- Ecosystem is minuscule - forget finding random middleware packages
- Error messages are sometimes cryptic compared to Express
- Authentication middleware choices are limited (we built our own JWT handler)
- Community is small, so debugging weird issues means reading source code
The edge compatibility is real though. Same codebase runs on Cloudflare Workers for our public API and AWS Lambda for admin functions.
Drizzle: Prisma Withdrawal Was Painful But Worth It
Switching from Prisma to Drizzle took our team 3 weeks and a lot of swearing. But now I can actually see the SQL queries and optimize them when things go wrong. The bundle size comparison is brutal - Drizzle's about 1.5MB while Prisma clocks in at 6.5MB.
Migration Hell:
- No automatic migration tool from Prisma schemas
- I manually rewrote like 40 models, took forever
- Learning SQL again after years of Prisma magic
- Generated TypeScript types look different, broke some frontend code
Production Wins:
- Bundle size dropped massively (confirmed by migration studies)
- Can actually debug slow queries by reading the generated SQL
- Connection pooling works predictably (Prisma's pooling was a black box)
- Type inference is legitimately better - schema changes break at compile time
- Performance benchmarks show Drizzle is consistently faster at runtime
The Real Trade-off:
Prisma is magic until it breaks, then you're fucked. Drizzle makes you write actual SQL, which is annoying until you need to debug something at 3am. I prefer seeing the SQL.
Integration Gotchas That Will Bite You
Docker Deployment:
Spent an entire Saturday debugging weird SSL cert issues with Alpine. Turns out Bun doesn't play nice with Alpine's SSL setup - something about certificate chain validation failing in random production requests. Switched to Ubuntu base images and it just worked. No idea why the SSL implementation is different, but I'm not going back to find out. Our production Docker images still shrunk way down compared to the Node.js mess.
Database Connections:
Lambda + Drizzle = use single connections (max: 1
). Learned this after 2 days of getting random "connection terminated unexpectedly" errors. Turns out when Lambda containers freeze, connection pools don't handle the resume gracefully. I was getting ECONNRESET errors on like 30% of requests after periods of inactivity. Single connections just reconnect automatically when the container wakes up.
Package.json Nightmares:
Bunch of npm packages are fucked. Keep a Node.js environment around for testing packages before committing to them. Recent security fixes show the ecosystem is still maturing.
TypeScript Compilation:
Bun's TypeScript support isn't 100% compatible with tsc
. Some advanced type gymnastics break. We had to simplify some utility types.
This stack is fast and the developer experience is good once you get through the initial pain. But don't expect a smooth migration - budget 2-3 weeks for a medium-sized API and keep your Node.js deployment ready as backup.
The question is: how do you actually implement this thing without losing your sanity? That's what we'll cover next.