Libzmq: Round Robin algorithm not working as expected

Created on 18 Jan 2016  Â·  10Comments  Â·  Source: zeromq/libzmq

I was prototyping the following pattern to achieve a Round Robin messaging methodology using a load balancer

DEALER(Client) ->[Frontend ROUTER,Backend DEALER]->DEALER(worker)

where [Frontend ROUTER,Backend DEALER] is the Load Balancer

From the above combination we have observed that any message sent to backend DEALER is always sent as a broadcast to N workers rather than Round Robin

Then i tried [Frontend ROUTER,Backend ROUTER] . Here its a different problem. The message is not sent to the workers at all. It just simply hangs.

Please note that the workers are only connecting to Backend sockets and not explicitly registering to it.

Any idea?

Area (Runtime / Usage) Need More Information

All 10 comments

@prashantabkari
Could you please:

  • provide a test case or sample code to simulate the behaviour; it would go a long way
  • provide platform and build details
  • clarify if you are using ZeroMQ through an extension / binding

@hintjens @bluca
Any thoughts?

Haven't experienced this, but if we get more details on how to reproduce I'm happy to have a look

@prashantabkari regarding the problem with router as backend, when using this pattern you have to prepend the worker router id (identity) to the message.

@somdoron
Is this documented / does it need to be documented in the zguide?

Of course, both in the guide and docs. when using router socket type the first frame is the identity. Majordomo for example is using router as backend.

In that case, if this is documented behaviour, then I suggest we close this issue. If @prashantabkari or others suffer a similar issue then they can continue commenting here.

Two thumbs-up should do the trick to move in that direction. :)

But he still have a problem with broadcast, it seems like wrong usage, let's wait for him to upload some code.

OK.

the guide is not documentation, and really wont be updated. please use the
man page system as basis for api docs, rfcs for protocols, readmes for
other pieces.
On 20 Apr 2016 10:01, "Doron Somech" [email protected] wrote:

But he still have a problem with broadcast, it seems like wrong usage,
let's wait for him to upload some code.

—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/zeromq/libzmq/issues/1712#issuecomment-212314253

Hi - I guess we can close this issue. I currently dont have the code. But when i come across this issue, i shall inform the team. Thanks for your support.

Was this page helpful?
0 / 5 - 0 ratings