Services are born into a life of sweat and suffering, but some can't stand the beating or the garbage being thrown at them, and they die on you. Hence the question:<p>What are you using to keep them always up and running?<p>I've used djb's daemontools some 6 years ago, and it was okay back then, but I wonder what is being used by those setting up their gear now. I've also compiled this quick list of players in this space after some googling and asking around:<p><pre><code> * monit http://mmonit.com/monit/
* supervisord http://supervisord.org/
* daemonize http://bmc.github.com/daemonize/
* runit http://smarden.sunsite.dk/runit/
* perp http://b0llix.net/perp/
* launchd http://launchd.macosforge.org/
* DJB's daemontools http://cr.yp.to/daemontools.html
</code></pre>
Pointers to alternatives, too, are greatly appreciated!<p>Thank you!
I use init. Most of my services manage their own daemonization and forked workers. It's easier to design a correct system to detect failure, issue alerts, and restart as necessary than building unkillable workers. Coupled with some basic init scripts, it works pretty well.<p>I like monit, but it has a weird habit of running super-slowly, failing to restart services, or otherwise flaking out.
This post by patio11 is a more in-depth "how to keep everything up" post rather than a rundown of specific tools (though it mentions tools also), but I thought it was quite informative: <a href="http://www.kalzumeus.com/2010/04/20/building-highly-reliable-websites-for-small-companies/" rel="nofollow">http://www.kalzumeus.com/2010/04/20/building-highly-reliable...</a>
I've used both daemontools and monit in anger. For a single server that I'm not particularly concerned about, monit has been more than sufficient and convenient. The web interface to see what's going on isn't bad either. On the other hand, it can send me annoying blizzards of emails when things break.<p>For the next project, I'm going back to daemontools, for a multitude of reasons. Between the /service directory and the svc command, automating stuff is ridiculously easy. I can get the active health check stuff by writing a ten-line script that does a much better check on a server than the generic checks monit provides. I can get emails when bad stuff happens with logcheck.<p>Daemontools is just so goddamn unixy.
I used to use Monit a lot, but recently started going simpler. We run our entire backend / platform on Heroku, and all our processes are actually DelayedJob workers that run constantly. Using a begin/rescue/ensure we can make sure the "process" here keeps going. It's a little harder to work in a cloud environment, but doing this has saved us from needing any type of sys admin work at all.<p>It's great using tools like Heroku, who then teams up with awesome other services and then provides great tools to really make life easy as a developer.
Bear in mind that at least supervisord and daemontools expect to be the parent of a running, foregrounded process. Monit expects processes to run in the background and generate a pid file, I'm not very familiar with the others.<p>I really enjoy supervisord personally, it feels similar to daemontools in execution but has a somewhat friendlier interface all around.
Monit seems to be the currently preferred solution in the Rails world. I use it on many different sites with no problems.<p>I've also used daemontools in the past and never had an issue with it, either.<p>I've heard good things about god, but I've not used it myself. (Now there's a sentence that could be taken out of context.)
I pretty much use Monit for everything.
(Though I wasn't aware of supervisord.)<p>I'm always looking forward to infrastructure/scaling/systems-engineering posts like these.