[zeromq-dev] Multiple ventilators <=> Multiple workers

Pieter Hintjens ph at imatix.com
Thu Nov 22 04:27:49 CET 2012


If you want to properly load-balance, rather than distribute work, you
need two things:

1. a single queue for all tasks
2. handshaking between workers and this queue

Which is the load-balancing pattern from the Guide. You can send an
empty reply but there has to be some signal from workers to the queue
to indicate that they are ready for the next task.

-Pieter



On Thu, Nov 22, 2012 at 3:36 AM, Gregory Sainson
<gregory.sainson at gmail.com> wrote:
> Hi,
>
> I exactly want to do a divide and conquer approach and implement this
> example: http://zguide.zeromq.org/page:all#toc13
> The only difference is that I have multiple ventilators but fewer than
> workers and I don't care about the sink.
> I also want to be able to easily add ventilators and workers to my topology.
>
> I just want to loadbalance tasks between multiple workers. Those taks coming
> from multiple ventilators.
>
>
> I want my ventilator to fire and forget. I don't want to use REQ/REP because
> I don't need a REP!
> And as I understood, I can't user the broker/dealer stuff with PUSH/PULL.
>
> I imagine I could have a topology like:
> - Multiple SUB being my ventilators: They generate the tasks
> - One PUB / PUSH : I receives all the tasks and push them to the workers.
> This centralize everything
> - Multiple PULL aka workers
> But I would have the problem of loadbalancing because PUSH/PULL doesn't
> handle this well, and syncing them is just impossible.
> "The ventilator's PUSH socket distributes tasks to workers (assuming they
> are all connected before the batch starts going out) evenly. This is called
> load-balancing and it's something we'll look at again in more detail."
>
> Or just use the loadbalancing example for my problem :
> http://zguide.zeromq.org/page:all#toc65
> But the fact that I don't need any Reply makes it a little useless..
>
> Thx for your help.
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>



More information about the zeromq-dev mailing list