Forum Discussion
andrew_deackes_
Nimbostratus
Dec 16, 2008GTM LDNS Persistence Not Adequate
Hi,
we are using our GTM's to distribute users connections to a SSL RAS solution. We have it set to be Round Robin between the two datacentres where the RAS devices are located. We also...
JRahm
Admin
Dec 16, 2008I had a situation where I addressed this a few years back. Here's a cleaned up version of that effort:
when HTTP_REQUEST {
if { [HTTP::cookie exists "ssl_persist"] } {
if { [catch { pool [lindex [HTTP::cookie ssl_persist] 1] member [lindex [HTTP::cookie ssl_persist] 2] [lindex [HTTP::cookie ssl_persist] 3] }] } {
HTTP::redirect "https://[lindex [HTTP::cookie ssl_persist] 0]/[HTTP::uri]/"
} else {
pool [lindex [HTTP::cookie ssl_persist] 1] member [lindex [HTTP::cookie ssl_persist] 2] [lindex [HTTP::cookie ssl_persist] 3]
}
}
}
when HTTP_RESPONSE {
HTTP::cookie insert name ssl_persist value [concat [virtual name] [LB::server]]
}
Note that in the redirect line, the first element in the list is the virtual name, not the address, so if it is not the FQDN of your local virtual (not the GTM wideIP), then you'll need to provide some means to extract that. This can be handled in a data class like this and then extracted with findclass:
class mySiteVips {
mySiteAVipName my.siteA.VipFQDN
mySiteBVipName my.siteB.VipFQDN
}
HTTP::redirect "https://[findclass [lindex [HTTP::cookie ssl_persist] 0] $::mySiteVips " "]/[HTTP::uri]/"
HTH... 🙂
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