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?

This (single executable) is available in node.js now too as SEA mode.
But I think it still doesn't work with ESM, only CommonJS, so while not insurmountable, not as good as bun.

SEA with node.js "works" for nearly arbitrarily general node code -- pretty much anything you can run with node. However you may have to put in substantial extra effort, e.g., using [1], and possibly more work (e.g., copying assets out or using a virtual file system).

[1] https://www.npmjs.com/package/@vercel/ncc

@vercel/ncc

Simple CLI for compiling a Node.js module into a single file, together with all its dependencies, gcc-style.. Latest version: 0.38.4, last published: 7 months ago. Start using @vercel/ncc in your project by running `npm i @vercel/ncc`. There are 154 other projects in the npm registry using @vercel/ncc.

npm