Forum Discussion

Jesse_DeFer_418's avatar
Jesse_DeFer_418
Icon for Nimbostratus rankNimbostratus
May 18, 2005

LB::server addr

I'm having problems with the LB::server addr variable. If I create an iRule like the following, the HTTP_REQUEST event doesn't always report an IP address while the LB_SELECTED one does. Is this expected behavior? I need to check the node being used in the HTTP_REQUEST event, is LB::server addr even the correct variable to use?

when LB_SELECTED { 
   log "lb selected [LB::server addr]" 
 } 
 when HTTP_REQUEST { 
   log "lb selected [LB::server addr]" 
 }
  • unRuleY_95363's avatar
    unRuleY_95363
    Historic F5 Account
    I'm not sure what you are expecting [LB::server addr] to return. This provides the address of the load-balanced pool member. At the time HTTP_REQUEST event is evaluated, the load-balancing decision has not been made yet, therefore LB::server addr likely does not have anything to return (unless you previously used a node or pool command to directly select the node). So, yes, this is expected behavior. The LB_SELECTED event is triggered after the load-balancing decision has been made.

     

     

    Perhaps you can elaborate on why you need to check the node being used in the HTTP_REQUEST event. You likely want to put that logic in the LB_SELECTED event. You should still be able to add/modify headers or cookies in that event.