Basically, a process itself to manage the application processes like cluster, restart / reload the process without downtime, smart restart etc.
A process managers helps us to scale the application and make the application available which prevents downtime of the application.
Printing the logs to the terminal and writing the logs to a file in a configurable directory with rotation.
Same as master-slave concept, the process manager should be able to start the process in cluster mode for.
With the help of multiprocessing, the process manager should able to act as a reverse proxy to distribute traffic uniformly across the processes.
The process manager must re-route the traffic the new process with the update code when the application code needs to updated after a release post deployment of the latest build while killing the old processes after it has processed all the request and gracefully shutdown to avoid data packets loss.
Monitoring 3 critical health metrics which is measuring the usage i.e. consumption percent of how much is utilised and how much is available of cpu, memory (RAM) and disk space so that alerts and automation can be put in place for cleanup or auto-scaling the application.
When the application process stops / exits due to run time code defect in a given scenario then a good process manager is able to facilitate auto-restart of the application in case if the application is not fault tolerant and follows fail fast principle.
Other than fulfuling the primary features, it has an independent and light weight orchestration tools like swarm or the most preferred Kubernestes for clustering.
Docker containers requires less computing H/W compared to other process managers and relatively, it is very simply and easy to start the process without much hassale as the OS dependencies are taken care of by the container.