I am configuring some services to run on Ubuntu server.
I was going through the link below where they use runit to run the services and monit to monitor the services -
http://rubyworks.rubyforge.org/manual/monit.html http://rubyworks.rubyforge.org/manual/runit.html
1) The services are all started through monit. 2) Monit inturn starts them using runit.
What is the advantage of using the above setup, where the services are run using runit via Monit. Why use runit in the middle, instead of directly starting them with monit?
runit is better suited for running processes, as it does not depend upon the pid files and, will also restart if the child process crashes.
Monit in turn monitors the performance of these process, and restarts them using runit as needed.
Monit polls the processes, whereas runit runs them as child processes. My guess is that adding runit to the monit setup has the ability to increase the uptime percentage of your services.