[zeromq-dev] load balance vs data distribution

Martin Sustrik sustrik at 250bpm.com
Mon Mar 8 19:51:24 CET 2010

Hi Dave,

> I am doing some investigation of zeromq v2 and I am curious where the
> concept of load balancing and data distribution went.  I'm sure I'm
> simply not looking in the right place.  I was able to get a basic
> pub-sub (chat) working with zmq_forwarder, but it seems this is an
> example of data distribution (all display procs get chat messages).  I
> tried the man pages of zmq_forwarder but there doesn't seem to be
> anything there (empty man page structure is all).  Is there a way to
> specify load-balancing in the config.xml file used by the
> zmq_forwarder?  Or is load balancing accomplished is some other way?

To implement butterfly scenario (parallelised pipeline) use ZMQ_UPSTREAM 
and ZMQ_DOWNSTREAM sockets instead of ZMQ_PUB and ZMQ_SUB. Use 
zmq_streamer device instead of zmq_forwarder.

> Are there any more examples for v2.0 available?  More specifically,
> has anybody migrated the butterfly example to v2.0?

I believe Gonzalo Diethelm have implemented butterfly example in Java, 
however, he haven't published it yet.


More information about the zeromq-dev mailing list