TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: keeping services up and running?

36 点作者 nprincigalli大约 15 年前
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!

12 条评论

nixme大约 15 年前
Dustin Sallings says, "<i>Don’t start programs, run programs.</i>"<p>See: <a href="http://dustin.github.com/2010/02/28/running-processes.html" rel="nofollow">http://dustin.github.com/2010/02/28/running-processes.html</a>
aphyr大约 15 年前
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.
_delirium大约 15 年前
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>
njl大约 15 年前
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.
kineticac大约 15 年前
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.
skorgu大约 15 年前
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.
评论 #1369715 未加载
msisk6大约 15 年前
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.)
damienfir大约 15 年前
I use supervisord to run my python webservers. Works pretty well.
vimalg2大约 15 年前
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.
aditya大约 15 年前
god is nice too: <a href="http://god.rubyforge.org/" rel="nofollow">http://god.rubyforge.org/</a>
评论 #1369743 未加载
bensummers大约 15 年前
SMF on Solaris / OpenSolaris.
jacquesm大约 15 年前
monit works wonders for me.<p>I got it through a post much like this one.