使用pm2在同一节点上运行多个节点实例

我想在单个服务器上运行2个node.js应用程序,使用pm2,这些应用程序需要通过puppet部署。请您build议这是可能的。

问候,巴拉

YOu可以通过pm2运行同一个nodejs应用程序作为一个集群。 https://github.com/Unitech/pm2#commands-overview

pm2 start app.js -i 4 # Start 4 instances of application in cluster mode 

所以它也平衡你的过程。 这与傀儡无关。

要运行多差异节点应用程序,您可以检查process.yml

http://pm2.keymetrics.io/docs/usage/application-declaration/

然后

 # Start all applications $ pm2 start process.json