Can we use both NGINX and PM2 for node.js production deployment?

Viewed 9719

I am new to Node.js. I have built my first Node.js server. I am doing some research to improve performance of node js server in production. So I learned about NGINX and Process Manager(PM2).

NGINX:

  1. It can load balance the incoming requests.
  2. It can act as reverse proxy for our application.

PM2:

  1. It can divide our application as clusters though it has in built load balancer.
  2. We can monitor and restart application when crashed.

Can we use both for production?

Though load balancer is there in PM2 can I use only PM2?

What is the advantage of using NGINX over PM2?

If I use Load balancer using NGINX and clustering using PM2, will it give better performance than using only one (NGINX or PM2)?

1 Answers
Related