Forum Discussion

susie_su_201256's avatar
susie_su_201256
Icon for Nimbostratus rankNimbostratus
May 13, 2015

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

  • 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?
  • 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.
  • 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's avatar
      susie_su_201256
      Icon for Nimbostratus rankNimbostratus
      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 ?
  • 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's avatar
      susie_su_201256
      Icon for Nimbostratus rankNimbostratus
      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 ?