[zeromq-dev] PUSH/PULL HWM documentation
Pieter Hintjens
ph at imatix.com
Wed Oct 5 16:08:18 CEST 2011
On Tue, Oct 4, 2011 at 8:32 PM, James Cipar <jcipar at cmu.edu> wrote:
> Hi. I found something that may be an error in the ZMQ documentation regarding "load balancing" with PUSH/PULL sockets. At best, it's pretty confusing.
This is true. "Load-balancing" is inaccurate. I've fixed the doc for
2-1 and 3-0, and am updating the api site.
Using the HWM to control load is the wrong approach; this does not
accurately or reliably map to consumer activity. You need to use an
application-level pattern to ensure work is sent as you want. The
Guide explains this starting with the LRU pattern. A more flexible
approach is to use credit-based flow control such as explained here:
http://unprotocols.org/blog:15
For multithreading, I can recommend CZMQ's thread package, which is
simple and designed for 0MQ apps: http://czmq.zeromq.org.
-Pieter
More information about the zeromq-dev
mailing list