Forum Discussion
AlanTen
Altostratus
Sep 04, 2015One-Way Persistence records problem
Hello All,
tl;dr - I have an iRule that is allowing HTTP_Request to insert invalid persistence records and unnecessary updates to existing persistence records and I would like to stop that by using...
AlanTen
Altostratus
Sep 07, 2015The iRule that we successfully tested on Friday had some minor adjustments made because somewhere in the back end something was wanting the pool name as well 😕
iRule Name: JSESSIONID_Persist_v4
Last Mod: AT 2015/09/04
when HTTP_REQUEST {
Check if there is a JSESSIONID cookie in the request header.
if { [HTTP::cookie "JSESSIONID"] ne "" }{
Run a lookup for any existing records, return relevant values for any matches
otherwise ignore and follow load balancing method to select destination server.
set ppool [ persist lookup uie [string tolower [HTTP::cookie "JSESSIONID"]] pool ]
set pnode [ persist lookup uie [string tolower [HTTP::cookie "JSESSIONID"]] node ]
set pport [ persist lookup uie [string tolower [HTTP::cookie "JSESSIONID"]] port ]
if { $pnode != "" }{
pool $ppool member $pnode $pport
}
}
}
when HTTP_RESPONSE {
Check if there is a jsessionid cookie in the response.
if { [HTTP::cookie "JSESSIONID"] ne "" }{
Persist off of the cookie value with a timeout of 6 minutes to ensure that
the F5's persistence entry will not expire before the server token.
persist add uie [string tolower [HTTP::cookie "JSESSIONID"]] 315
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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