[zeromq-dev] Fwd: problems with load-balancing exchange
Martin Hurton
hurtonm at gmail.com
Mon Aug 17 12:44:47 CEST 2009
Hi Pavel,
On Wed, Aug 12, 2009 at 9:20 PM, Pavel Gushcha<pavimus at gmail.com> wrote:
> Trunk has similar problem as workaround.If i start/stop display instances
This is a general problem, not one related to load-balancing logic.
> after prompt, all works perfectly. But:
> 1) if prompt started after display, display doesn't receive any messages.
> After restarting display, problem goes away.
When you start the display process before the prompt one, the
display should normally fail (because there is no global
exchange to bind display's queues to.)
But it may happen that ZMQ server still contains location information
cached from the previous run. Then the display will not fail
gracefully but instead will keep trying to connect to non-existent
exchange.
> 2) if display started after prompt, all is ok. After restart prompt, display
> doesn't receive any messages. After restarting display problem disappears.
The same logic applies here. When you restart the prompt process, the
global exchange will be listening at different TCP port. The
display process will, however, try to reconnect to the old one.
You can work around these issues by creating you exchange at fixed TCP
port , like
int eid = api->create_exchange ("GLOBAL_E",zmq::scope_global,
"eth0:22000", pt,1,&pt,zmq::style_load_balancing);
- Martin
>
> 2009/8/12 Martin Hurton <hurtonm at gmail.com>
>>
>> Hi Pavel,
>>
>> Could you please test you app with the trunk? I have committed a fix
>> to properly support load balancing when multiple queues of one process
>> are bound to global exchange.
>>
>> - Martin
>>
>> On Wed, Jul 29, 2009 at 11:06 AM, Pavel Gushcha<pavimus at gmail.com> wrote:
>> > I tried to buid test apps from chat example (see attaches). Prompt
>> > creates
>> > global load-balancing exchange and display creates three api_thread with
>> > one
>> > local queue for each api_thread. I think, i miss something, because now
>> > i
>> > get message dups in any case (if i start prompt after display of display
>> > after prompt).
>> >
>> > PS: I use official release 0MQ v1.0.0
>> >
>> > 2009/7/28 Martin Sustrik <sustrik at fastmq.com>
>> >>
>> >> Martin Hurton wrote:
>> >>>
>> >>> Hi Pavel,
>> >>>
>> >>> Could you please prepare a minimal test program so that I can
>> >>> reproduce this on my own?
>> >>
>> >> Agreed. This looks like a straightforward bug. Your test program would
>> >> help to reproduce the issue.
>> >>
>> >> Martin
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > zeromq-dev mailing list
>> > zeromq-dev at lists.zeromq.org
>> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>> >
>> >
>
>
More information about the zeromq-dev
mailing list