Forum Discussion

kridsana_52318's avatar
kridsana_52318
Icon for Nimbostratus rankNimbostratus
Mar 15, 2015

what is round robin algorithm in deep

Hi

 

I have 12 client access VS with have 12 pool member and perform source persist

 

at fist

 

when client 1 access VS >> LB to webserver1.

 

when client 1 access VS again >> LB to webserver1 due to source persist

 

but when client 2 access VS >> LB to webserver1 !!

 

question is Why client 2 LB to webserver1 ? RR method is to LB to server "next in line" so this client 2 should LB to webserver2, am I correct?

 

From this problem we experience Uneven LB (some webserver have no client LB to it and some webserver have more client than the rest)

 

How is Round robin algorithm actually do?

 

Thank you

 

10 Replies

  • If you talk about CMP , then let me assume this.

     

    If client1 access VS >> LB to ws1 (after that also LB to ws1 due to source persist)

     

    when client2 access VS >> It should LB to WS2 (which next-in-line server)

     

    If you say differrent tmm thread work independently. First LB of all those thread should be ws1 all the time (From SOL14358) so it shouldn't LB to any server other than WS1.

     

    Am I correct?

     

  • If you say differrent tmm thread work independently. First LB of all those thread should be ws1 all the time (From SOL14358) so it shouldn't LB to any server other than WS1.

     

    yes

     

    • kridsana's avatar
      kridsana
      Icon for Cirrocumulus rankCirrocumulus
      Yeah , so it is a problem because after we test load from 12 client stat of pool member is not even ws1 have most connection and ws2 ,3, 4 ,5,7 have uneven connection while other ws have no connection at all.
    • nitass's avatar
      nitass
      Icon for Employee rankEmployee
      internet traffic is supposed to be varying. so, connection should be distributed evenly or almost evenly.
    • kridsana's avatar
      kridsana
      Icon for Cirrocumulus rankCirrocumulus
      Yeah I think so too. After a while connection will be distributed evenly but problem we got is , The first connection of those thread not LB to WS1 and it's also not LB to every pool member too. and we also use source address persist , so after first connection (which not nearly even at all) , F5 won't LB anymore and some pool member will never got connection. (this is test phase so we got only twelve test client)
  • If you say differrent tmm thread work independently. First LB of all those thread should be ws1 all the time (From SOL14358) so it shouldn't LB to any server other than WS1.

     

    yes

     

    • kridsana's avatar
      kridsana
      Icon for Cirrocumulus rankCirrocumulus
      Yeah , so it is a problem because after we test load from 12 client stat of pool member is not even ws1 have most connection and ws2 ,3, 4 ,5,7 have uneven connection while other ws have no connection at all.
    • nitass_89166's avatar
      nitass_89166
      Icon for Noctilucent rankNoctilucent
      internet traffic is supposed to be varying. so, connection should be distributed evenly or almost evenly.
    • kridsana's avatar
      kridsana
      Icon for Cirrocumulus rankCirrocumulus
      Yeah I think so too. After a while connection will be distributed evenly but problem we got is , The first connection of those thread not LB to WS1 and it's also not LB to every pool member too. and we also use source address persist , so after first connection (which not nearly even at all) , F5 won't LB anymore and some pool member will never got connection. (this is test phase so we got only twelve test client)
  • Hi teepan123,

     

    if you are looking for a even load distribution you may want to follow the described approach in this thread:

     

    https://devcentral.f5.com/questions/moving-traffic-from-vip-to-vip

     

    In this case a table counter is increased with each incoming request and based on a modulus the new connection will be forwarded to the next poolmember in row.

     

    In case you would like to follow this method, I´m happy to modify it accordingly.

     

    As Nitass already wrote, in real life and on a highly frequented systems it finally does not really matter to have an exact 1:1 distribution. In case the clients are using random source ports you will observe an even distribution of current connections to the available pool members. That´s statistics. :)

     

    Thanks, Stephan