April 5, 2026
Hot takes served on a sizzling Bun
We replaced Node.js with Bun for 5x throughput
Bun swap claims 5x speed — devs hype, skeptics yell “it’s just maps”
TLDR: A team says swapping Node.js for Bun and simplifying code made a critical service run 5x faster. Commenters are split: some credit Bun’s leaner server and single-binary builds, others say the speedup came from basic cleanup—while a fixed memory leak and “just rewrite it in Go/Rust” chants add fuel to the fire.
Trigger.dev says swapping Node.js for Bun in its “Firestarter” service made it five times faster, and the comments section immediately turned into a performance cage match. Fans cheered the move to Bun’s leaner web server and even drooled over “bun build —compile,” which packages the app into a single executable. One excited voice framed it like a dev ops cheat code: fewer files, faster start, happier deploys. But the peanut gallery wasn’t about to let Bun take all the credit.
Skeptics pointed out the real glow-up came from old-school tidy-up: ditching a tiny in-memory SQL database for a simple in-memory map, and replacing heavyweight data checks with basic “if” statements. Translation: they stopped bringing a bazooka to a water balloon fight. A side plot fueled the drama: the team found a memory leak in Bun’s HTTP handling; commenters quickly jumped in to say the leak on unresolved promises was already fixed. Meanwhile, monorepo veterans threw shade, warning Bun still gets awkward in big projects and Docker builds. And of course, the Go/Rust crowd rolled in like clockwork: why not rewrite it in a “real” systems language? Between “Bun magic” believers and “maps and ifs” minimalists, it’s a full-on bunfight—served piping hot.
Key Points
- •Trigger.dev’s Firestarter service moved from Node.js to Bun and reported an overall ~5x throughput increase.
- •Replacing an in-memory SQLite query with a composite-key Map for matching yielded ~2.2x throughput and median latency improvements.
- •Re-profiling after removing SQLite showed >50% CPU in node:http internals; switching to Bun’s HTTP stack delivered another ~2x gain.
- •Consistent benchmarking used 500 simulated controllers with long-poll connections and k6 generating 50 concurrent requests over 30 seconds.
- •A memory leak specific to Bun’s HTTP model was observed; Bun’s profiling (--cpu-prof-md) highlighted hotspots, including Zod validation (~22% CPU).