Hi,

Which one is the correct behavior?

Because in my setup both backend have a weight of 10, so loadbalancing should be 50% each, correct? If I look at the iptables output, I see that HUB_1 has probability of 1.000000 while HUB_0 has 0.500000 My understanding is that HUB_1 has 66% (1/1.5) of the load and HUB_0 has 33% (0.5/1.5) of the load. It seems to be confirmed by the stats in the iptables output: HUB_1 has received 335k packets for 417M, and HUB_0 has received 167k packets for 208M.
So it seems that HUB_1 has received 2 times more request than HUB_0

Regards,

On 13/12/2013 13:13, Laura Garcia wrote:

Hi tibz, it's the correct behavior to calculate the probability based in the desired weight.

Why do you suspect that is wrong?

Regards

El 13/12/2013 11:32, "tibz" <[email protected] <mailto:[email protected]>> escribió:

    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 <http://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 <http://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 <http://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 <http://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]
    <mailto:[email protected]>
    https://lists.sourceforge.net/lists/listinfo/zenloadbalancer-support



------------------------------------------------------------------------------
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

------------------------------------------------------------------------------
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