[zeromq-dev] Fwd: problems with load-balancing exchange
Pavel Gushcha
pavimus at gmail.com
Tue Aug 18 10:26:39 CEST 2009
Yes, fixed TCP port solves, the problem. BUT! I use config file (attached in
email with source examples, see attach of this email). In this config file
GLOBAL_E is described and problem must not appear. It seems, i made stupid
mistake, but not understand where...
What i doing:
1) start server with "zmq_server --config-file zmq_server.conf"
2) start display
3) start prompt
2009/8/17 Martin Hurton <hurtonm at gmail.com>
> 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
> >> >
> >> >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20090818/58acb8ec/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zmq_server.conf
Type: application/octet-stream
Size: 92 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20090818/58acb8ec/attachment.obj>
More information about the zeromq-dev
mailing list