I'd like to know more about the cluster mode solution that PM2 implements. what happens behind the curtains?
it is not explained on http://pm2.keymetrics.io/docs/usage/cluster-mode/.
can I combine it with node cluster (https://nodejs.org/api/cluster.html)?
I see it uses a custom load balancer. but how does it instantiate many instances without 'rebind the same port' problem?
Our cluster mode is just a wrapper around the implementation of nodejs, we use it to abstract the cluster logic for your application. Since we just use the nodejs implementation, there isnt any custom load balancing.
just for curiosity, could you give me a high-level idea how the wrapper works? I don't like to use something that works like a 'black box' or 'magic tool', 'miraclely' solving a problem. It can help me and of course, someone else when designing systems. I'm reading the pm2 codes but it can take a while before I have a good idea of what it is going on.
I'm sorry for any inconvenience and thank you a lot.
thanks. it is a good start point.