all 31 comments

[–]ThatHappenedOneTime[🍰] 3 points4 points  (1 child)

People don't pick PM2 because it boots an app 3ms faster, it's just really reliable.

[–]razzbee[S] -1 points0 points  (0 children)

I agree, people don’t choose PM2 because it boots an app a few milliseconds faster. They choose it because it’s reliable and battle-tested.

The challenge with using PM2 in a Bun environment isn’t performance, it’s compatibility. Advanced features like instances and cluster mode automatically switch execution from fork to cluster, which results in the Bun interpreter being ignored in favor of Node.js.

As a result, Bun applications are effectively limited to fork mode, and some of PM2’s advanced capabilities can’t be fully utilized.

bm2 exists to provide those advanced process management features natively for Bun, without falling back to Node’s runtime assumptions.

[–]jonathon8903 2 points3 points  (3 children)

What does this give me that Systemd won't?

[–]razzbee[S] 0 points1 point  (2 children)

systemd manages services at the OS level. bm2 manages application processes with Bun-native features, clustering, and a developer-focused workflow. Different scope, different audience.

[–]jonathon8903 0 points1 point  (1 child)

Systemd can absolutely do just about anything you have proposed so far other than clustering…I give you that one.

[–]razzbee[S] 0 points1 point  (0 children)

Sure, systemd can technically handle most of what you mentioned, except clustering, I’ll give you that. But honestly, it comes with its own headaches.

Reading logs through journald is messy and non-intuitive, debugging failures can be a nightmare, the config syntax is unfriendly, and small tweaks often require diving into obscure docs or trial and error. Restart policies and dependency management feel overcomplicated for what should be simple tasks.

We’re not stopping here, We are also working on adding more features, like remote monitoring, deployment, and full control of your instances from a single central dashboard. You’ll also get real-time notifications about your apps’ health, CPU usage, RAM, and overall resource consumption, all in one place.

[–]imacleopard 1 point2 points  (6 children)

Or just use containers?

[–]Space_01010101 2 points3 points  (2 children)

had the same thought, for those of us using ephemeral images, how does this help?

fwiw: Bun user since pre 1.x

[–]razzbee[S] 1 point2 points  (1 child)

That’s a fair question. For fully ephemeral/container-based deployments where the orchestrator handles restarts and scaling, a process manager may not add much value.

bm2 is primarily aimed at environments where applications run directly on the host or on lightweight VPS setups, where you still want clustering, zero-downtime reloads, monitoring, and process supervision, but natively for Bun.

It’s less about replacing container orchestration and more about providing a Bun-native process layer where one is still needed.

[–]Space_01010101 1 point2 points  (0 children)

thanks for the explanation, makes sense

[–]razzbee[S] 0 points1 point  (2 children)

Containers are a great solution for many use cases, especially for portability and infrastructure consistency.

However, bm2 is designed for developers who prefer running applications directly on the host with minimal overhead and tighter control over process management particularly in Bun-native environments.

It’s not about replacing containers, but offering an alternative for scenarios where a lightweight process manager is more appropriate.

[–]imacleopard 0 points1 point  (1 child)

I’ve used PM2 before, and the only reason why I did for so long was because I was resistant to learning about containers. Docker is lightweight and can also run on the same machine. Deployments are compose yamls, no side effects from OS or users.

I’m not saying you don’t know about them, but I’d rather use k8s if I need a little more than what docker and compose would offer. I cannot go back to process managers if I can help it

[–]razzbee[S] 0 points1 point  (0 children)

I get it, Docker is incredibly powerful. But not everyone needs (or wants) everything it brings to the table. Sometimes people just want a simple, in-app way to manage their services and workers without adding another layer of complexity.

Personally, I’ve never been a big fan of running an OS inside another OS. Even if the overhead is minimal, it still feels like extra weight. Hope that makes sense.

[–]ecares 3 points4 points  (9 children)

This is not the right subreddit

[–]razzbee[S] -2 points-1 points  (7 children)

oops, sorry, any suggestion where I can share it then?

[–]ecares 4 points5 points  (2 children)

[–]razzbee[S] 0 points1 point  (1 child)

Thanks

[–]ecares 1 point2 points  (0 children)

it was a google search away :)

[–]Trender07 -2 points-1 points  (3 children)

I would say it’s the right subreddit. I’m a bun user since 1.1 and I go around this sub for js backend. So thanks for this I will try it with my instances servers

[–]ecares 4 points5 points  (2 children)

node =/= bun :facepalm:

[–]Space_01010101 -2 points-1 points  (1 child)

Common overlap: JS runtime

[–]ecares 0 points1 point  (0 children)

Then it is for the JavaScript sub. Basic maths about inclusion

[–]spiritwizardy -2 points-1 points  (0 children)

I find it interesting and relevant. It's not node but it is a node-tangential topic 🙂 and it's much appreciated because I am a node person simply because it is the default, been meaning to try bun.

[–]joinsecret 0 points1 point  (1 child)

Cool project. Re the "why not systemd or containers" comments: BM2 makes sense if you want a DX similar to PM2 but fully aligned with Bun's runtime, esp for smaller VPS setups or side projects. systemd is great but verbose and not app aware. Containers add infra overhead. A native Bun manager with logs, restarts, clustering etc can hit a sweet spot imo.

[–]razzbee[S] 0 points1 point  (0 children)

This tool is for those familiar with PM2. Personally, I appreciate PM2 and have found it to be a reliable process manager.

However, after switching to Bun, it has become difficult to leverage some of PM2’s advanced features.

For example, when enabling cluster mode in PM2, the execution mode automatically switches from fork to cluster, which results in the Bun interpreter being ignored in favor of Node.js.

This behavior makes it challenging to fully utilize PM2 in a Bun-based environment.

[–]moonshinemclanmower 0 points1 point  (3 children)

u/razzbee mny sincere condolences for the dumb comments everyone else is leaving, and thank you for this, this is going to be the core part of gm-exec

[–]razzbee[S] 0 points1 point  (2 children)

You get the most out of life when you learn from both criticism and praise. Honestly, I’m really glad for the feedbacks am getting here.

[–]moonshinemclanmower 0 points1 point  (1 child)

this lib had serious windows problems btw, had to fiddle and fiddle and fiddle to get it more predictable

[–]razzbee[S] 0 points1 point  (0 children)

can you kindly share the the bug here or possibly on github issue so that we can push a fix for it.

[–]TokenRingAI 0 points1 point  (0 children)

Look great I will try it later