著者: Martijn Dekkers 日付: To: poitr pogo CC: dng 題目: Re: [Dng] Why daemontools is so cool
Hey Poitr,
s6 advertises itself as init replacement. > No, S6, runit, daemontools, etc advertise as supervisor tools. Some of
these, like S6, are also a sane init replacement, should you want to go
this way.
> I'm not using s6 or daemontools. I do not need them.
Some people do need them. We do a lot of work with large scale (1000's)
containers. Supervisors are mighty handy for that use-case, as well as a
fair few others.
> Just learned
> about them and I'm bit surprised thy tend to replace init instead of
> being a good helpers for those who need them.
> They can be both.
> IMHO they came into existence cause more and more applications were
> missing "deamon" part, to make sysadmin/programmer life easier. s6 doe
> not support those which daemonize on its own, anyway :)
> They came into existence because some jobs cannot afford to fail. If they
do, they must be restarted, and if they keep failing, a human has to be
alerted. Supervisors have been around since the dawn of modern computing.
> init has inittab for monitoring application which need continuous
> restart by design like getty.
>
> If a daemon needs to be monitored and restarted when it dies, bug
> should be fixed.
> Yeah, because the only reason jobs die is because bugs. Even so, fixing
bugs takes time. when an ecommerce site dies, you might put up a holding
page saying "PLEASE WAIT WE ARE FIXING BUGS BECAUSE OUR PRINCIPLES ABOUT
HOW SOFTWARE SHOULD BE OPERATED ARE MORE IMPORTANT THAN SERVING CUSTOMERS".
We will chose to log the fault, restart the process, and keep on trucking.
> I expect a deamon to work from start to stop command. No self stopping.
> How did that work out for you in real life?
> As workaround nohup, screen, while `true`,etc are enough to keep
> system running until bug is fixed.
> Seriously? You are simply describing a crude, primitive and low-functional
supervisor routine. Essentially what you are saying is "Supervisors should
never be needed, because I write my own"
> I do not like buggy software, so maybe that's why i do not need
> s6/daemontools.
> I do not like disappointing customers, and that's why we use supervisors.