Forum Discussion

Dave_156's avatar
Icon for Nimbostratus rankNimbostratus
Mar 02, 2011

Persistence vs iRule - which takes precedence ?




Firstly, I'm a newcomer to the world of F5, so I apologise if this is an obvious question.



We have an application which is configured to use "source_addr" persistance, as well as two iRules. The application relies on a client always being sent to the same server for the duration of their session. We also have a notion of a "VIP" member, who is directed to a specific pool which has a better "quality of service" associated with it, based on the content of the incoming request.



I have implemented this via two iRules as shown below:



when HTTP_REQUEST { if { [HTTP::uri] contains "VIP" } { pool Pool-VIP} }






when HTTP_REQUEST { if { [HTTP::uri] contains "Standard" } { pool Pool-Standard} }



However, if a client request comes in from a particular ip address, and is sent to the "VIP" pool, then a short while later another request comes in from the same ip address but should be sent to the "Standard" pool (based on the content of the incoming request), it still gets routed to the VIP pool.



I assume this is due to the source_addr persistence taking priority over the iRule ? ie if a 2nd request comes in from the same ip address, it is sent to the same pool based on the persistence profile, regardless of where the iRule would route it ? If so, is there a way to work around this ?






1 Reply

  • You're actually running into a fun issue with the way LTM "load balances" and "persists" users.