Hello,

On zlb v3.03 i've configured a L4 DNAT farm. I've left the loadbalancer 
algorithm on "weight", and i've added 2 backend with each a weight of 10.
That way I was expecting distribution to be 50% each.

root@VMWZLB003:/usr/local/zenloadbalancer/config# iptables -t mangle -L 
-v -n
Chain PREROUTING (policy ACCEPT 522K packets, 435M bytes)
  pkts bytes target     prot opt in     out     source destination
  335K  417M MARK       all  --  *      *       0.0.0.0/0 
192.168.135.4       statistic mode random probability 1.000000 /* 
FARM_ZLB-EXCH-HUB_1_  */ MARK set 0x201
  167K  208M MARK       all  --  *      *       0.0.0.0/0 
192.168.135.4       statistic mode random probability 0.500000 /* 
FARM_ZLB-EXCH-HUB_0_  */ MARK set 0x200

Obviously one is being given 2/3 (1 compared to 1.5) of connections and 
the other only get 1/3 (0.5 compared to 1.5).

If I set weight of 20 to the HUB_0, I have this result:
root@VMWZLB003:/usr/local/zenloadbalancer/config# iptables -t mangle -L 
-v -n
Chain PREROUTING (policy ACCEPT 510 packets, 177K bytes)
  pkts bytes target     prot opt in     out     source destination
   117  115K MARK       all  --  *      *       0.0.0.0/0 
192.168.135.4       statistic mode random probability 1.000000 /* 
FARM_ZLB-EXCH-HUB_1_  */ MARK set 0x201
    83 87809 MARK       all  --  *      *       0.0.0.0/0 
192.168.135.4       statistic mode random probability 0.666667 /* 
FARM_ZLB-EXCH-HUB_0_  */ MARK set 0x200

So HUB_O is not given twice the weight as it should...

Changing the algorith to Priority and setting a priority of 10 to each 
backend doesnt seems to be the solution. As far as I've seen, priority 
is only to have failover backend, not loadbalancing.

So do I misunderstand something or is the way you calculate the weight 
to set the probability in the iptables wrong?
I feel like it should be "probability = weight / sum(weight)", no?

Thanks
tibz

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Zenloadbalancer-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/zenloadbalancer-support

Reply via email to