Forum Discussion

guy_deffaux_215's avatar
guy_deffaux_215
Icon for Nimbostratus rankNimbostratus
Apr 04, 2006

Similar feature to LB::status under v9.0.5

Hi,

 

 

We are about to use iRules to load balance servers based on the state of other servers. For example the rule would look like "if poolB-node3 down go node poolA-node1 else use poolA".

 

 

Our production system runs under BIGIP v9.0.5, but the key feature LB::status is only available from v9.2.0.

 

 

Is there something approaching to LB::status on 9.0.5 or my only option is to upgrade OS?

 

 

Thanks for the help
  • unRuleY_95363's avatar
    unRuleY_95363
    Historic F5 Account
    You could still pick the specific pool member and if it turns out to be down, the LB_FAILED event would be triggered and you could reselect another pool member or repick the pool to have it load-balance to any other available pool member. The LB::server command is available in 9.0.5 and it will return the currently selected pool/member so you can test which pool member is down. You may also want to use a variable to additionally control the behavior in the LB_FAILED event since it may be triggered multiple times in the event additional pool members are down.

     

  • Thanks for the very quick reply. We used the function active_members which I was not aware before.

     

     

    Let me explain what we do, as a reference:

     

     

    - we only have 2 servers, each one runs 2 services Svc1 and Svc2

     

    - the request logic is:

     

    * a request must go to a server with Svc1 up

     

    * if there is node with Svc2 up, go to this node

     

     

    We create 2 pools, each one with the same 2 servers but each pool has its own monitor, pool1 monitor svc1 and pool2 monitors svc2.

     

     

    The irule becomes:

     

     

    if active_members(pool1) < 2

     

    because we have only 2 servers, only 1 has svc1 up, so go to this one

     

    pool pool1

     

    else

     

    we have 2 servers with svc1 up

     

    if active_members(pool2) > 0

     

    svc2 is up on at least 1 node, use pool2 to load balance

     

    pool pool2

     

    else

     

    svc2 is down on both servers, load balance

     

    pool pool1

     

     

    A bit complex, but it achieves our purpose.

     

     

    Thanks again

     

  • rather straight foward. Srv1 = COM+ and Svc2 = MQ

    BIG-IP sees only HTTPs traffic encrypted by web server

    
    when CLIENT_ACCEPTED {
      log "Client accepted"
      if { [active_members Test_iRule_HTTPS_Pool] < 2 } {
        log "0 or 1 HTTPS (COM+) node up -> use HTTPS pool Test_iRule_HTTPS_Pool"
        pool Test_iRule_HTTPS_Pool
      }
      else {
         2 nodes up on POOL_HTTPS
        if { [active_members Test_iRule_MQ_Pool] > 0 } {
          log "2 HTTPS (COM+) nodes up, 1 or 2 MQ nodes up -> use MQ pool Test_iRule_MQ_Pool"
          pool Test_iRule_MQ_Pool
        }
        else {
          log "2 HTTPS (COM+) nodes up, 0 MQ node up -> use HTTPS pool Test_iRule_HTTPS_Pool"
          pool Test_iRule_HTTPS_Pool
        }
      }
    }