The problem is: I need to do some stuff (write to database, log etc.) after 
some timeout after last message from some client. I'm using timeout to 
determine that client stopped answering, so I need to log it. To do it I 
need to have some sort of timer. And this timer must work no matter how 
many workers I have. And timeout must happen no matter what worker process 
messages from client. 
By the way, I develop a web service with mojolicious. I want to find out 
what mojolicious techniques I can use to create such timer. Or I need to 
use not mojolicious techniques. 

P.S. And also it's desirable to have such timer with Starman server, not 
only Hypnotoad.  

Thanks,
Dmitry

четверг, 19 марта 2015 г., 22:25:57 UTC+5 пользователь Dan Book написал:
>
> The idea is that hypnotoad will manage its workers, so yes, you cannot 
> rely on which worker will handle a given connection. Each worker should run 
> their own IOLoop and thus their own timers. If you describe the issue more 
> precisely maybe we can help further.
>
> On Thu, Mar 19, 2015 at 3:46 AM, Bakanov Dmitriy <[email protected] 
> <javascript:>> wrote:
>
>> Hello,
>>
>> I'm currently using hypnotoad and nginx reverse proxy. I want to use 4 
>> hypnotoad workers. I would like to understand, will nginx use random 
>> workers (and random IOLoops) each time? Is it possible to run hypnotoad 
>> workers with different ports to make nginx server management more explicit?
>> Currently I have issue with IOLoop timer in my mojolicious app. I have no 
>> this problem, when I use only one worker, or when I use direct connection 
>> to hypnotoad without nginx proxy. I think it's because nginx uses random 
>> worker (and random IOLoop) to send message, but when I have direct 
>> connection worker is not random, so is here anyone who is using hypnotoad 
>> with multiple workers and nginx and who knows how to make nginx 
>> communication with Hypnotoad workers less random and more explicit? Or, 
>> probably mojolicious developers can explain it. 
>>
>> Thanks,
>> Dmitry
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Mojolicious" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/mojolicious.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to