Forum Discussion

Denis_9818's avatar
Icon for Nimbostratus rankNimbostratus
Oct 06, 2010

Persistance question



I have a virtual server for which I have the following persistance configuration:


- default cookie profile assigned to the virtual


- an iRule that uses universal persistance for requests with certain URI::query parameters. Here is the iRule:




set log_prefix "[IP::client_addr]:[TCP::client_port]"


Check if query string parameter named ticket has a value


set alf_sess [string tolower [URI::query "?&[HTTP::query]" "&alf_ticket"]]


set alfsess [ string tolower [URI::query "?&[HTTP::query]" "&ticket"]]


if { $alf_sess ne "" }{


Persist off of the ticket value


persist uie $alf_sess




if { $alfsess ne "" }{


persist uie $alfsess








Check if there is an alfticket cookie in the response


if {[HTTP::cookie "alfticket"] ne ""} {


Persist off of the cookie value with a timeout of 1 hour (3600 seconds)


persist add uie [string tolower [HTTP::cookie "alfticket"]] 3600


log local0. "$log_prefix: Added persistence record from cookie:[string tolower [HTTP::cookie "alfticket"]]"







My question is, since I do not use the above iRule in a universal persistance profile, which in turn would be applied to the virtual, just applying the iRule as a resource, will that have the expected behavior? From F5 support documents, they present only instances when a universal persistance profile is created and applied to the virtual. In my case, I need to persist both, client to server communication and server to server communication (which doesn't send the HTTP cookie headers all the time but they include the ticket as a query parameter). For client to server I use the default cookie persistance and for server to server I use the above iRule - any possible conflicts here? Will the universal persistence through the iRule work as expected? From my tests, things look OK, but I just want to run it by the community for validation.




No RepliesBe the first to reply