What is the difference between clusters nodejs + domains and PM2?

NodeJS has its own modules for managing clustering and process restart:

Then PM2 is in there , and I've seen guides like this one saying PM2 allows logging, some statistics monitoring, process restart and clustering for nodejs.

Besides monitoring statistics and logging, can anyone explain what is the difference between the two? Are they supposed to be used together or am I choosing one or the other?

In production, like each tariff on shutdown + restart on load for a nodejs app:

  • The system needs to be rebooted (using system patches, etc.)

  • Restarting all nodejs processes to apply new code changes to the server.

+3


source to share


1 answer


PM2 uses a cluster under the hood, and makes cluster management easy. For your requirements, you want to watch PM2.



0


source







All Articles