On Mon, Jun 28, 2010 at 1:20 PM, Holger Hoffstaette <[email protected]> wrote: > On Mon, 28 Jun 2010 11:08:13 -0500, Brian Granger wrote: > >> The current load balancing algorithm used by the XREQ socket is defined in >> lb.cpp. Requests are simply round robin'ed through the active pipes: >> [snip] >> I am wondering if we can do better than this. My idea is to pick a client >> at random, rather that walking through them sequentially. > > Btw: http://berezecki.com/?p=22
Great link, thanks! This is a brilliant and simple idea as well. Although to implement this, it would require tracking how many messages each client has been sent. I also liked the shuffle idea that someone commented on below. I may try these ideas out. > I'm a big fan of randomization, however for "perfect" balancing (e.g. > request/response time minimization) of jobs with large deviation you'll > always need statistics or weights. Things only get more complicated from > there. :) Yes, but, as Martin brought up, there is also the load balancing effect of the HWM. When a clients queue fills up to the HWM, the client becomes passive so it won't get any further messages for a while. Cheers, Brian > -h > > > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > -- Brian E. Granger, Ph.D. Assistant Professor of Physics Cal Poly State University, San Luis Obispo [email protected] [email protected] _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
