Forum Discussion
Imbalance 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 request about persistence. www request ---> cookie persistence app request ---> source_addr persistence.
I try to edit iRules, but has issue, Error is "TCL error: /Common/MY.Test.iRules.201505013 - Prerequisite operation not in progress (line 1) invoked from within "HTTP::host”"
Because F5 technical guy had configured my current F5 per this requirement before, but it caused imbalance LB, seems current iRules doesn't work, all of traffic went to fallback(source_addr persistence).(default persistence is cookie, fallback is source_addr). It's really hard for me to solve it, could you give me any feedback, please ?
Hope you can answer me ASAP. thanks.
Best Regards, Susie.
7 Replies
- nitass
Employee
Because F5 technical guy had configured my current F5 per this requirement before, but it caused imbalance LB, seems current iRules doesn't work, all of traffic went to fallback(source_addr persistence).(default persistence is cookie, fallback is source_addr). can you post the irule? and why do you think it does not work? - susie_su_201256
Nimbostratus
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. - susie_su_201256
Nimbostratus
It's enough, or need me offer much more information ?
- nitass
Employee
Because current result of LB, It's pretty imbalance, and based /Statitics/Local Traffic/Persistence Records
which one is imbalance? is it web or application?
if it is application, do you know if all requests contain x-forwarded-for header?
I found www page generated named source address affinity record.
i understand fallback persistence record is always created (it does not mean it is being used).
- susie_su_201256
Nimbostratus
Yes, it's application. I try to edit iRules, but has issue, Error is "TCL error: /Common/MY.Test.iRules.201505013 - Prerequisite operation not in progress (line 1) invoked from within "HTTP::host”, but in fact, current iRules is correct for syntax at least, do you have any idea about this error ?
- nitass_89166
Noctilucent
Because current result of LB, It's pretty imbalance, and based /Statitics/Local Traffic/Persistence Records
which one is imbalance? is it web or application?
if it is application, do you know if all requests contain x-forwarded-for header?
I found www page generated named source address affinity record.
i understand fallback persistence record is always created (it does not mean it is being used).
- susie_su_201256
Nimbostratus
Yes, it's application. I try to edit iRules, but has issue, Error is "TCL error: /Common/MY.Test.iRules.201505013 - Prerequisite operation not in progress (line 1) invoked from within "HTTP::host”, but in fact, current iRules is correct for syntax at least, do you have any idea about this error ?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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