Forum Discussion
AndyC_86542
Nimbostratus
Jan 26, 2009Strange persist behaviour
I have this little section of code in an iRule that decides which of various pools to send an HTTP request to. I wanted to make sure that requests from a single client go through the same proxy server...
hoolio
Cirrostratus
Jan 27, 2009I don't see anything obvious in the config that would cause this. For testing, can remove the source address persistence profile from the VIP? Can you also clear the persistence records for the VIP (or wait for them to clear) and then sprinkle your iRule generously with this:
log local0. "Current persist record for [IP::client_addr]: [persist lookup source_addr $sourceIPAddress]"
Can you also run 'b persist all show all' once you see the problem occur? Please post anonymized copies of the logs and the 'b persist' output.
when CLIENT_CONNECTED {
log local0. "[IP::client_addr]:[TCP::client_port]:\
[persist lookup source_addr [IP::client_addr]], new connection"
}
when HTTP_REQUEST {
log local0. "[IP::client_addr]:[TCP::client_port]:\
[persist lookup source_addr [IP::client_addr]], request, URI: [HTTP::uri]"
set hasCookie [HTTP::cookie exists $::cookieName]
if {!($hasCookie)}
{
log local0. "[IP::client_addr]:[TCP::client_port]:\
[persist lookup source_addr [IP::client_addr]], no cookie, using login-pool, URI: [HTTP::uri]"
pool login-pool
}
else
{
log local0. "[IP::client_addr]:[TCP::client_port]:\
[persist lookup source_addr [IP::client_addr]], cookie, using squid-pool, pre-persist, URI: [HTTP::uri]"
Cookie found
<...some URL parameter tweaking code removed...>
Use persist by client ip address with a timeout of 2 hours
pool squid-proxy-pool
persist source_addr 7200
log local0. "[IP::client_addr]:[TCP::client_port]:\
[persist lookup source_addr [IP::client_addr]], cookie, using squid-pool, post-persist, URI: [HTTP::uri]"
}
}
Aaron
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