Forum Discussion
susie_su_201256
Nimbostratus
May 12, 2015Imbalance LB in "Select different persistence methods"
Hi F5 Expert,
Could you help me check this error in the following, or give me a template of iRules about this requirement?
Thanks in advance.
Requirement:
Separate app request from www...
susie_su_201256
Nimbostratus
May 12, 2015Hi,
iRules:
when HTTP_REQUEST {
If we are using the App, we should override the default persistence profile
We will force the use of a hash for client_ip and x-forwarded-for
if { [string tolower [HTTP::host]] eq "app.xyz.com" } {
log local0. "Bypassing Cookie Persistence: [string tolower [HTTP::host]][string tolower [HTTP::path]]"
If there is an X-Forwarded-For header, use this
if {[HTTP::header X-Forwarded-For] != ""}{
log local0. "Using X-Forwarded-For: [HTTP::header value "X-Forwarded-For"]"
persist uie [HTTP::header X-Forwarded-For] 600
Otherwise, use Client IP Address
} else {
log local0. "Using IP: [IP::client_addr]"
persist uie [IP::client_addr] 600
}
}
}
Because current result of LB, It's pretty imbalance, and based /Statitics/Local Traffic/Persistence Records, I found www page generated named source address affinity record.
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