Forum Discussion
susie_su_201256
May 13, 2015Nimbostratus
Hi,
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.