httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject mod_proxy_balancer lbset functionality
Date Sun, 01 Feb 2009 08:08:42 GMT
Hi,

Think Jim introduced the lbset balancer property, so he would probably
know best how this is supposed to work.

IIUC lbset should allow to create the group of balancer members,
and that's great. However IMO the logic inside balancer providers
in not valid. The balancing should be done for a particular
set, however IMO it's done always from 0...current set

Here is the code
if (worker->s->lbset > cur_lbset)
   continue;
...
cur_lbset++

IMO it should be
if (worker->s->lbset != cur_lbset)
   continue;
...
cur_lbset++

According to the doc:
"The load balancer will try all members of a lower numbered
  lbset before trying higher numbered ones."

I think that point of having sets is to make
lb within the set, but right now if we have
four sets and cur_lbset is > 0 it's done for
all sets lower then a current one (multiple times)

With the compare change all members with lower
lbset will be tried, but according to its set.

Also, current logic is configuration order dependent:
BalancerMember A ... lbset=0
BalancerMember B ... lbset=1
BalancerMember C ... lbset=0
BalancerMember D ... lbset=1
BalancerMember E ... lbset=2
BalancerMember F ... lbset=2

will make the following probes:
0: A C
1: A B C D
2: A B C D E F

however with != compare this would be:
0: A C
1: B D
2: E F



Regards
-- 
^(TM)

Mime
View raw message