Forum Discussion
Leslie_South_55
Nimbostratus
Nov 06, 2006Persist with multiple cookies
I have posted this question in an older thread, but I thought I would start a new one to see if I can get any bites.
I have the need to persist to weblogic servers using 1 of any 5 cookies, includ...
JRahm
Admin
Nov 07, 2006In this case, you don't need the cookie persistence since you have the server information in the inserted cookie. By extracting this information in the request, you can send the connection directly to the server defined in the cookie. You don't need the virtual server name for your application, so I cleaned that up as well.
when HTTP_REQUEST {
if { [HTTP::cookie exists "ltmcookie"] }{
HTTP::cookie decrypt "ltmcookie" "ltmcookiepassword"
set poolid [lindex [HTTP::cookie ltmcookie] 0]
set serverid [lindex [HTTP::cookie ltmcookie] 1]
set portid [lindex [HTTP::cookie ltmcookie] 2]
pool $poolid member $serverid $portid
log local0. "Sending request to pool $poolid, member $serverid, port $portid"
} else {
pool pool_myhttp-pool
}
}
when HTTP_RESPONSE {
HTTP::cookie insert name ltmcookie value [LB::server]
HTTP::cookie encrypt "ltmcookie" "ltmcookiepassword"
}Standard warning...untested (in this form, anyway!)
Updated to include a logging statement.
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
