Zero downtime and automatic restart of nodejs server

I am working on implementing a Nodejs based application and I want zero downtime and automatic deployment on file change. As a result, I have the following requirements.

  • If the Node process crashes, it must restart itself. Any time the file changes, it has to restart itself in order to deploy
  • When the system reboots, the Node server should reboot
  • If the memory or CPU consumption is greater than a certain value, the Node server must reboot.
  • When a server image is created from an already installed server and creates a new server from that and then on the new server it should have the same settings
  • In case the Nodejs server receives a stop signal, it should be shutdown gracefully, i.e. it must stop accepting the new connection and must first complete the existing request and then must be shutdown

Please, help.

+3


source to share





All Articles