automatically spawn new workers

Eugene Toropov jt at aaanet.ru
Wed Dec 26 00:29:47 UTC 2007


Hi Joe,

Thank you for your answer.

"You'd need to have a process monitoring how many workers are being actively 
worked and then spawn more from that." -- How can we understand that a 
worker is actively working at the moment?

Eugene

>> I've been trying to find out how to automatically spawn new workers 
>> (like apache do this), but still can't find anything.
>>
>> Does anybody know if this is possible or not ?
>
> This isn't *really* how Gearman works. You'd need to have a process 
> monitoring how many workers are being actively worked and then spawn  more 
> from that. Gearman workers aren't on demand like Apache. Instead  they 
> connect to the Gearman server and then, basically, poll the  Gearman 
> server asking if it has any work for it to do.
>
> For what it's worth I use a program called daemon to keep the workers  I 
> do start up and running (for instance, the PHP workers die if a non- 
> Net_Gearman exception is thrown). There's really nothing to keep you  from 
> firing up more workers than you need. That's what we do.
>
> --Joe
>
>
> 



More information about the Gearman mailing list