You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thanks for your blog post here. It's been very valuable example for communicating with my team.
In this project, cluster.fork(); is used to duplicate your process numCPUs times. Then in the blog post, you mention pm2 start dist/main.js -i max, where this also creates the process numCPUs times. When applying both, wouldn't one be creating numCPUs^2 processes if you were to use clusterize and pm2 -i max?
Well, spoiler alert :) it doesn't create that many processes. In my experiment, if you run with pm2 cluster mode, it seems like the AppClusterService doesn't do anything. I'm trying to figure out why that is. In any case, with pm2, it seems like you can safely remove AppClusterService
The text was updated successfully, but these errors were encountered:
Hi there,
First of all, thanks for your blog post here. It's been very valuable example for communicating with my team.
In this project,
cluster.fork();
is used to duplicate your processnumCPUs
times. Then in the blog post, you mentionpm2 start dist/main.js -i max
, where this also creates the processnumCPUs
times. When applying both, wouldn't one be creatingnumCPUs^2
processes if you were to use clusterize andpm2 -i max
?Well, spoiler alert :) it doesn't create that many processes. In my experiment, if you run with pm2 cluster mode, it seems like the AppClusterService doesn't do anything. I'm trying to figure out why that is. In any case, with pm2, it seems like you can safely remove
AppClusterService
The text was updated successfully, but these errors were encountered: