Forum Discussion

naladar_65658's avatar
naladar_65658
Icon for Altostratus rankAltostratus
Feb 09, 2009

Default Persistence profile and iRule persistence

I have already posted this to the iRules Forum, but thought I would post it here after reading a post by Deb on persistence profiles.

I have an iRule applied to a VS that sends traffic to different pools based on its uri. I have a default persistence profile defined already on the VS (smsession) but on one of the pools I would like to use a different method of persistence (cookie).

If I define the persistence to that pool in my iRule as shown below, which method of persistence is used in the end? Can you even use a default persistence profile AND specify a different method using an iRule?

 
 when HTTP_REQUEST { 
 set header_uri [string tolower [HTTP::uri]] 
 if { [matchclass $header_uri starts_with $::fun_uri] } { 
 pool fun_Pool 
 } elseif { [matchclass $header_uri starts_with $::oam_uri] } { 
 HTTP::redirect "https://oam.companyname.com/oam/main/oamMain.jsp" 
 } elseif { [matchclass $header_uri starts_with $::CP_uri] } { 
 persist cookie insert "Citrix_Cookie" "0d 03:00:00" 
 pool CP_Pool 
 } else { 
   pool WWW_Pool 
  } 
 }