Forum Discussion

Matt_Breedlove_'s avatar
Matt_Breedlove_
Icon for Nimbostratus rankNimbostratus
Jun 06, 2011

Continued irule exection paste pool command

I realise that if the pool command is issued in an irule, it must be followed by a 'return', if conditions/pool commands follow in latter logic that could also include the current connection, but why is this in term of use cases?

 

 

In almost all irule usage in my experience the "pool" command is either in a chained logic command or at the logical end of the irule anyway, so this almost never comes up as "pool' is at the "end" if its used in an irule, but in a small percentage of cases, this becomes significant where the last logical "pool" overrides the first, necessitating the "return" after the first.

 

 

If evaluating an irule on a current connection or request, once a pool command is issued, shouldn't the irule stop evaluation with an implicit meta return/event disable all? What kind of situation would require the need to not have this?

 

 

Thanks

 

M

 

  • Hi Matt,

     

     

    There are reasons to not kill execution of all iRules on a connection once a pool has been selected. You might want to do a header insert in HTTP_REQUEST or HTTP_REQUEST_SEND, select another pool from the same or another iRule or select a pool from another event like HTTP_CLASS_SELECTED. Basically, I don't think the TMM developers could reasonably assume that you wouldn't want to do something else after a pool command.

     

     

    Aaron
  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    Aaron's exactly right. It's to allow greater flexibility with the language to account for more possible use cases. Is there a particular use case where this is tripping you up that we might be able to offer advice or a solution for?

     

     

    Colin
  • That makes sense, didn't have a problem in mind. Usually I stay within the event confines irule usage wise of http_request, http_response, client_accepted, and rule_init...so it's no wonder I wouldn't see the value for cases where other events are being leveraged that I don't need/use/know about.

     

     

    Had a feeling there was more to this, thanks for taking the time to explain : )

     

     

    Thanks

     

    M