Forum Discussion

Mohit_Rathee's avatar
Mohit_Rathee
Icon for Nimbostratus rankNimbostratus
Feb 22, 2019

Default Pool Selection if irule selected pool is down.

We have a applied a irule to VS who selects a pool X with a single node X based on HTTP header. My question is that if node X is down which in turn make the pool down ,will the traffic will be directed to the default pool of the VS?

 

Additional Info - We are not checking the health of pool X in irule so it is selected whether it is up or down.

 

  • Can you please provide your iRule.

     

    You can apply both irule and default pool to virtual server or just iRule.

     

    iRule will have high priority over default pool.

     

    1st step is traffic flow according to the iRule and any traffic not matching iRule then it will go to default pool.

     

    hope this helps.

     

    • Mohit_Rathee's avatar
      Mohit_Rathee
      Icon for Nimbostratus rankNimbostratus

      when CLIENT_ACCEPTED { if { [IP::addr [IP::client_addr]/24 equals 10.10.1.1] } { pool Pool_X } }

       

      And my default pool for VS is Pool_Y. Now suppose 10.10.1.1 makes a connection but Pool_X is down will it go to Pool_Y.

       

    • RaghavendraSY_7's avatar
      RaghavendraSY_7
      Icon for Cumulonimbus rankCumulonimbus

      If monitor is not assigned to the pool, virtual server will go to unkown status.

       

      A virtual server with an Unknown status will take in traffic and send it on to the resources even if they are not online.

       

      In your case you are sending traffic from 10.10.1.1 to pool X, if it not mathcing IP then it will go to PoolY. But configure your iRule as mentioned below and configure default pool to none under resource section. Hope this helps.

       

      when CLIENT_ACCEPTED { if { [IP::addr [IP::client_addr]/24 equals 10.10.1.1] } {

       

      pool Pool_X

       

      } else {

       

      pool default_pool

       

      }

       

    • Mohit_Rathee's avatar
      Mohit_Rathee
      Icon for Nimbostratus rankNimbostratus

      The problem is not if 10.10.1.1 don't match,problem is that if it matches and pool X is down will it go to pool Y?

       

  • Can you please provide your iRule.

     

    You can apply both irule and default pool to virtual server or just iRule.

     

    iRule will have high priority over default pool.

     

    1st step is traffic flow according to the iRule and any traffic not matching iRule then it will go to default pool.

     

    hope this helps.

     

    • Mohit_Rathee's avatar
      Mohit_Rathee
      Icon for Nimbostratus rankNimbostratus

      when CLIENT_ACCEPTED { if { [IP::addr [IP::client_addr]/24 equals 10.10.1.1] } { pool Pool_X } }

       

      And my default pool for VS is Pool_Y. Now suppose 10.10.1.1 makes a connection but Pool_X is down will it go to Pool_Y.

       

    • RaghavendraSY's avatar
      RaghavendraSY
      Icon for Altostratus rankAltostratus

      If monitor is not assigned to the pool, virtual server will go to unkown status.

       

      A virtual server with an Unknown status will take in traffic and send it on to the resources even if they are not online.

       

      In your case you are sending traffic from 10.10.1.1 to pool X, if it not mathcing IP then it will go to PoolY. But configure your iRule as mentioned below and configure default pool to none under resource section. Hope this helps.

       

      when CLIENT_ACCEPTED { if { [IP::addr [IP::client_addr]/24 equals 10.10.1.1] } {

       

      pool Pool_X

       

      } else {

       

      pool default_pool

       

      }

       

    • Mohit_Rathee's avatar
      Mohit_Rathee
      Icon for Nimbostratus rankNimbostratus

      The problem is not if 10.10.1.1 don't match,problem is that if it matches and pool X is down will it go to pool Y?

       

  • If you select a pool and it is down, has no members, you will trigger a LB_FAIL event. There is no intelligence in the pool command.

    You need to use the active_members command.

    when CLIENT_ACCEPTED {
     if { ([IP::addr [IP::client_addr]/24 equals 10.10.1.1]) && ([active_members Pool_X] > 0)} {
       pool Pool_X
     } 
    }