We replaced Node.js with Bun for 5x throughput

https://trigger.dev/blog/firebun

Why we replaced Node.js with Bun for 5x throughput | Trigger.dev

How we took our warm start service from 2,099 req/s on Node + SQLite to 10,700 req/s on a compiled Bun binary, and found a subtle memory leak that only exists in Bun's HTTP model.

>Next: the runtime itself. Bun has a bun build --compile flag that produces a single self-contained executable. No runtime, no node_modules, no source files needed in the container.

I didn't know that. So Bun is basically a whole runtime + framework all in one with little to no deployment headaches?

The bun build creates a large self-contained executable with no optimisations. Almost like a large electron build.

Deno also provides the same functionality, but with a smaller optimized binary.

Appreciate Bun helping creating healthy competition. I feel like Deno falls under most people's radar often. More security options, faster than Node, built on web standards.

Deno's security options are very useful for AI sandboxes. Broader than node's permissions. Bun badly needs the same.

There's a PR for Bun that gives the same security but it's been sitting for months https://github.com/oven-sh/bun/pull/25911

I want to migrate an existing project to Bun but cannot until it has a security permission system in place.

Secure Mode: Deno & Node.js compatible permissions for Bun, but better by kynnyhsap · Pull Request #25911 · oven-sh/bun

Summary Implements a Deno-compatible permissions model for Bun, providing granular control over system resource access. This PR introduces a security sandbox that can restrict file system, network,...

GitHub