Forum Discussion

Adnankhan's avatar
Adnankhan
Icon for Nimbostratus rankNimbostratus
Feb 08, 2019

Complete traffic failover between 2 priority groups

Hello Everyone,

 

I have created a pool with 10 member, Group A and Group B each has 5 members, with priority group of 10 and 5.priority group activation less 3 active members. when i disable 3 members in Group A(priority gp10), traffic is still going to the 2 active nodes in group A and nodes in Group B.

 

application demands the traffic to go to Group B Nodes, if less than 3 active members in Group A.

 

How can i do this? is there a irule ?

 

Thanks in advance.

 

6 Replies

  • wlopez's avatar
    wlopez
    Icon for Cirrocumulus rankCirrocumulus

    If all pool members in group A have a priority of 10, all for group B have a priority of 5, and you set priority group activation to less than 3:

    As soon as there are less than 3 pool members available/enabled, all pool members of the next highest priority group will be added to the traffic distribution, regardless of how many of them there are.

    In your scenario that means that the two remaining pool members for priority group 10 will be joined by all pool members with priority group 5.

    If you want to start sending all new traffic to a different group of pool members you will need an iRule like:

    when HTTP_REQUEST {
       if { [active_members pool_primary] < 3 } {
       pool pool_secondary
       }
    }
    

    where pool_primary includes the 5 pool members you had with priority 10 and pool_secondary includes the 5 pool members you had with priority 5.

    • Adnankhan's avatar
      Adnankhan
      Icon for Nimbostratus rankNimbostratus

      Hi wlopez, thanks for the reply, will this still use the 2 modes in group A.

       

    • wlopez's avatar
      wlopez
      Icon for Cirrocumulus rankCirrocumulus

      Not for new connections.

       

      Those connections that were established and had persistent connections before the event that triggered the iRule, will probably stay there.

       

      The iRule will load balance all new connections/requests/sessions to the secondary pool, but will not kill connections that were already established against the 2 remaining pool members on the primary pool.

       

      The same principle would apply to connections established against the secondary pool, when the primary pool goes back to having 3 pool members or more.

       

  • If all pool members in group A have a priority of 10, all for group B have a priority of 5, and you set priority group activation to less than 3:

    As soon as there are less than 3 pool members available/enabled, all pool members of the next highest priority group will be added to the traffic distribution, regardless of how many of them there are.

    In your scenario that means that the two remaining pool members for priority group 10 will be joined by all pool members with priority group 5.

    If you want to start sending all new traffic to a different group of pool members you will need an iRule like:

    when HTTP_REQUEST {
       if { [active_members pool_primary] < 3 } {
       pool pool_secondary
       }
    }
    

    where pool_primary includes the 5 pool members you had with priority 10 and pool_secondary includes the 5 pool members you had with priority 5.

    • Adnankhan's avatar
      Adnankhan
      Icon for Nimbostratus rankNimbostratus

      Hi wlopez, thanks for the reply, will this still use the 2 modes in group A.

       

    • wlopez_98779's avatar
      wlopez_98779
      Icon for Nimbostratus rankNimbostratus

      Not for new connections.

       

      Those connections that were established and had persistent connections before the event that triggered the iRule, will probably stay there.

       

      The iRule will load balance all new connections/requests/sessions to the secondary pool, but will not kill connections that were already established against the 2 remaining pool members on the primary pool.

       

      The same principle would apply to connections established against the secondary pool, when the primary pool goes back to having 3 pool members or more.