Workers vs Child Process and single file executable #14053
-
Currently we have implemented a "cluster" of Bun.serve/websocket servers using spawned child processes. To package these up we have been separately generating single file executables, one for the primary and the other for the children. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
There are yet-to-be-fixed reliability and memory usage issues that can happen when a Worker is terminated frequently. If you don't ever terminate the Worker though, it should work fine. |
Beta Was this translation helpful? Give feedback.
-
@Jarred-Sumner thanks as always for the prompt response. The workers should never be terminated in our case but we might err on sticking with the current child spawn approach for now (as we have battle/load tested that config). Will keep an eye on the docs as shipping 1 binary is more desirable. Cheers |
Beta Was this translation helpful? Give feedback.
There are yet-to-be-fixed reliability and memory usage issues that can happen when a Worker is terminated frequently. If you don't ever terminate the Worker though, it should work fine.