javascript - PM2 在运行时更改集群进程大小

标签 javascript node.js pm2

有谁知道是否可以在 NodeJS PM2 中更改应用程序在运行时的集群进程数?

问候 菲利普

最佳答案

您可以使用 pm2 scale 来垂直缩放运行时的进程数,注意它只适用于集群模式。 示例:

  • pm2 scale APPNAME 2 会将进程缩放到恰好 2 个实例。
  • pm2 scale APPNAME +2 将添加两个进程。
  • pm2 scale APPNAME -1 将删除一个进程。

source link

关于javascript - PM2 在运行时更改集群进程大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29319420/

相关文章:

javascript - 如何从 Node.js http get 请求中获取数据

javascript - 服务中的 $http 返回 Angularjs 服务中 $$state 的值

javascript - 应用 laravel spatie/CSP 后猫头鹰轮播列表不会显示

javascript - 从数组中获取三个最小值

node.js - PM2 正在运行额外的进程

javascript - sails js模板jst.js错误找不到变量_

javascript - 如何在 Node.js 中逐字节读取二进制文件

javascript - Node.js child_process exec,stdin 没有传递给 ssh

node.js - 使用PM2时如何配置master进程

node.js - pm2 部署 [node.js] - stash 凭证和敏感数据