[zeromq-dev] Load-balancing pattern vs. round-robin
Pieter Hintjens
ph at imatix.com
Mon Dec 3 07:47:01 CET 2012
On Mon, Dec 3, 2012 at 5:21 AM, Eugene Alterman <eugalt at gmail.com> wrote:
> The guide mentions two possible approaches for the design of the
> server-to-worker interface in the asynchronous client-server pattern -
> a ROUTER socket with the load-balancing pattern and a DEALER socket that
> does round-robin load balancing internally.
>
> In this particular case worker threads are in the same process as the
> server thread, but my understanding is that in the general case the
> second approach is more reliable, since if a worker goes offline a
> ROUTER will drop an unroutable message, while a DEALER will send it to
> another worker that is available.
The ROUTER-based load-balancing pattern will send messages only to
workers that are available, while DEALER will rotate messages to all
its connections even if some are busy and/or offline temporarily.
-Pieter
More information about the zeromq-dev
mailing list