does anyone know if it is possible to change in NodeJS PM2 the number of cluster processes for an application at runtime?
regards Philipp
You can use pm2 scale
to scale vertically the number of process at runtime, note that it only work with cluster mode.
Example :
pm2 scale APPNAME 2
will scale the process to exactly 2 instances.pm2 scale APPNAME +2
will add two process.pm2 scale APPNAME -1
will remove one process.