Re: supervise multiple workers

2015-09-28 Thread Alexander Zubkov
I have thaught about that too, but I was wondering if there is more 
simple and plain solutions. :)


On 28.09.2015 07:50, Colin Booth wrote:

On Sep 27, 2015 6:47 PM, "Laurent Bercot" 
wrote:


  IIUC this time, what you're mentioning here is instanced
supervision. And it has been mentioned several times on this list
in the past, but I don't think there's a supervision suite that
natively supports instances for now. I may be wrong though.


Correct me if I'm wrong, but can't you emulate an instanced supervisor by
setting up a service that's a run script for a different supervision tree
scanner? Some care (and possibly some support scripts) would be needed to
make sure that bringing down the main service properly shuts down the
sub-tree but there shouldn't be anything inherently impossible there.

Cheers!
-Colin





Re: supervise multiple workers

2015-09-27 Thread Laurent Bercot

On 28/09/2015 00:40, Alexander Zubkov wrote:

is I need a tool, to which I will pass number of workers I need and
program, then it will spawn given number of identical programs and
will keep them alive? I tried to google something, but may be I used
bad keywords?


 I think "preforking server" is the keyword you want.

 s6-networking doesn't do preforking. It's hard to do without support
from the program itself, because you need a minimal API to declare a
new connection assignment, an EOT, etc. I'm not sure whether a generic
preforking tool exists.

--
 Laurent


Re: supervise multiple workers

2015-09-27 Thread Alexander Zubkov
Prefork is not exactly the same I think. In this architecture program 
ends after finishing task. And it also commonly includes many other 
stuff like passing of "tasks" to workers. So googling it gives many 
irrelevant links for me.
Now I'm interested just in something that is supervising not one 
process, but N similar (started with the same command) processes.


On 28.09.2015 01:55, Laurent Bercot wrote:

On 28/09/2015 00:40, Alexander Zubkov wrote:

is I need a tool, to which I will pass number of workers I need and
program, then it will spawn given number of identical programs and
will keep them alive? I tried to google something, but may be I used
bad keywords?


  I think "preforking server" is the keyword you want.

  s6-networking doesn't do preforking. It's hard to do without support
from the program itself, because you need a minimal API to declare a
new connection assignment, an EOT, etc. I'm not sure whether a generic
preforking tool exists.





Re: supervise multiple workers

2015-09-27 Thread Laurent Bercot

On 28/09/2015 01:12, Alexander Zubkov wrote:

Now I'm interested just in something that is
supervising not one process, but N similar (started with the same
command) processes.


 Ah, sorry, I misunderstood - it sounded like you wanted a
superserver, but with preforked children.

 IIUC this time, what you're mentioning here is instanced
supervision. And it has been mentioned several times on this list
in the past, but I don't think there's a supervision suite that
natively supports instances for now. I may be wrong though.

 In the future, I plan to add support for instanced services to
s6-rc.

--
 Laurent