Help to deal with the clustering of pm2 and built into node js. Below is the code of the app.js file, which will be launched by the pm2 manager.
I am using inline node clustering. After starting, I see the command pm2 monit:
4 workers, memory 37 MB.
Now we get rid of clustering the node by running the worker directly.
And tell pm2 to use clustering.
We get 4 workers, each with 44 MB of memory.
I want to understand why it is better to use? Why 4 clusters of nodes eat less mem than a single pm2 cluster? Maybe I did not understand something?



