Forum Discussion
Persistence through IRULE
I have following irule:
when HTTP_REQUEST {
if {([HTTP::uri] contains "Communication") or ([HTTP::uri] contains "Builder") } {
persist cookie
pool XYZ
}
elseif { ([HTTP::uri] contains "PDFTemp") or ([HTTP::uri] contains "DOCTemp") }
{
persist none
pool ABC
}
}
But I am still seeing Persistence on second pool ABC and I had to put the Persistence method cookie on Virtual servers Resources, Default Persistence Profile Section.
If I don't put that on the Virtual server, it gives an error that irule is using Persistence method so VS needs to have "cookie" in VS > Resources > Default Persistence Profile Section : "Cookie"
- rob_carr
Cirrocumulus
I'm not clear on what issue you are facing. Do you want to have persistence on connections forwarded to pool ABC but are not seeing it, or do you want to not have persistence on pool ABC, but are seeing it?
 
Regarding the need for the cookie persistence profile on the virtual server, cookie, msrdp and ssl persistence all require the related persistence profile, per the 'persist' command page
 
I don't want persistence and seeing it on pool ABC,
- Andy_McGrath
Cumulonimbus
First your
command is incomplete so to remove the need for the the Persistence profile on the virtual server (see the wiki iRule wiki: persist).persist cookie
So should be the following:
persist cookie insert
e.g.
persist cookie insert f5Cookie 0
Second I would put the
selection command before the persist, not sure if you need to do this but always done it my self and more examples show this to be done, e.g.:pool
if {([HTTP::uri] contains "Communication") or ([HTTP::uri] contains "Builder") } { pool XYZ persist cookie insert f5Cookie 0 } elseif {([HTTP::uri] contains "PDFTemp") or ([HTTP::uri] contains "DOCTemp")} { pool ABC persist none }
Finally if you want to make sure you are enforcing the pool and persistence selection on every HTTP request I would attach a OneConnect profile to the virtual server K7208: Overview of the OneConnect profile if you don't already have one.
Recent Discussions
Related Content
* 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