Forum Discussion
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
}
}
- marcomerloNimbostratus
Hi , I have a "mirror" issue. I have a vip with a default pool and a default persistence profile. I need to write an iRule that select another pool for some clients that are listed in a data group but I have to be sure that the default persistece profile is used for those clinets as well. Will I get the result just omitinng any persist command in the iRule? Unfortunately I need both mirroring and croos service persistence that are not configurable with the persistence command ..
RegardsMM
- JRahmAdminThis should work fine, you can also disable persistence altogether when it's set on the virtual with the persist none command.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects