Forum Discussion
Previously i am using persistence as cookie, and this has removed and set to none. Is there any way to 'clear' the persistence for clients with exist
There may be a little confusion about your question.
If you're talking about using cookies to persist load balanced traffic, then there's nothing you really have to do once you disable it since all of the persistence information is stored within the cookie itself. There won't be a persistence table entry if using cookies.
If you're talking about using a persistent (ie. file-based) cookie for load balancing persistence, and though you've removed this persistence profile there are still clients with this cookie, then you can absolutely use an iRule to catch that. Something like this:
when HTTP_REQUEST {
set foundit 0
foreach x [HTTP::cookie names] {
if { $x starts_with "BIGipServerlocal" } {
set foundit $x
HTTP::cookie remove $x
}
}
}
when HTTP_RESPONSE {
if { ( [info exists foundit] ) and $foundit != 0 } {
HTTP::cookie insert name $foundit value "null" path "/"
HTTP::cookie expires $foundit 0 absolute
}
}
In this example I'm looking for a cookie that starts with "BIGipServerlocal". If it's found, the HTTP_REQUEST event removes it from the ingress stream so that load balancing persistence doesn't happen based on that cookie, and then sets a flag. In the HTTP_RESPONSE event, if the flag exists (the name of the cookie), a new cookie with the same name is sent to the client, but with an expires header that forces the client to delete the cookie.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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