实际上我无法理解使用pm2 scale [app-name] 10但我知道pm2 start app.js -i 4用于在集群模式下启动应用程序实例。
和另外一个问题,如果我将设置集群的数量会发生什么-1手段
pm2 start app.js -i -1
PM2 能够创建新进程或删除当前正在运行的进程,具体取决于您从文档中为scale选项提供的编号pm2 scale N:N is a consistent number which the cluster will scale up or down。
pm2 scale app +3 - 向当前运行的进程添加 3 个新进程。
pm2 scale app 3 - 将实例数设置为 3。感谢 @Jolly 的更正。
关于-1in pm2 start app.js -i -1,这意味着 PM2 将创建许多新进程,等于(Number of Cores)-1。
| 归档时间: |
|
| 查看次数: |
5680 次 |
| 最近记录: |