R
R
Rag'n' Code Man2021-06-12 22:53:13
Nginx
Rag'n' Code Man, 2021-06-12 22:53:13

If the server is using NGINX, is there a need for pm2?

The NGINX config has a parameter worker_processesor something like that.

If I understand correctly, then this parameter sets the number of application instances, and it is best that it does not exceed the number of cores.

For NodeJS applications, there is also a load balancer / classifier, with which you can also use all the processor cores.

If the server uses NGINX, is there any point in using PM2 at all? Or am I misunderstanding how NGINX works?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Yuriev, 2021-06-12
@iDmitriyWinX

  1. worker_processes is about the number of nginx workers (instances)
  2. PM2 is about the number of nodejs instances (in the context of the question)
  3. nginx and nodejs each live their own lives and are only connected via tcp or unix-socket

so yes it makes sense

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question