Skip to content

pm2

Defnition: A process manager. With a built-in load balancer. Keep applications alive forever(works as a daemon), reloads them without downtime, helps you to manage application logging, monitoring, and clustering.

mode

fork mode: a basic process spawning.

cluster mode: pm2 start index.js -i max use cluster api behind the scene. Only works with node application. 注意这时需要用分布式缓存哦

with containers