naladar_65658
Feb 09, 2009Altostratus
Using a default persistence profile and iRule persistence on the same VS
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 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 $::www_uri] } {
pool WWW_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 "CP_Cookie" "0d 03:00:00"
pool CP_Pool
} else {
pool My_Pool
}
}