Answer the question
In order to leave comments, you need to log in
How does pm2 start N application instances that are listening on the same port?
I would like to understand how PM2 works. PM2 launches, for example, 4 application instances and load balances between them. In this case, the port listens to the same one (3000 by default), the port number is hardcoded in the code, and is not taken from the environment. But there cannot be more than one application on the same port. PM2 itself generally does not know in advance which ports the application will use. How does he do it?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question