Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Persitence via Xfor

rosarra
Altostratus
Altostratus

Hello, I have a problem with the balancing of some systems. In the diagram below you can see the current balancer configuration.

Internet --> FrontEndF5 --> SecureProxy --> BackEndF5 --> Ohs-Pool --> BackEndF5 --> PortalServer-Pool

What I would like to achieve is to be able to balance the servers in the Ohs-Pool and the servers in the PortalServer-Pool using the Xfor field. From the logs I can see that the HTTP::header field "X-Forwarded-For is valid, but the iRule I created seems not to work and I get an error from the web portal.

My iRule:

when HTTP_RESPONSE {
if { [HTTP::header "X-Forwarded-For"] } {
persist add uie [HTTP::header "X-Forwarded-For"]
}
}
when HTTP_REQUEST {
if { [HTTP::header "X-Forwarded-For"] } {
persist uie [HTTP::header "X-Forwarded-For"]
}
}

1 ACCEPTED SOLUTION
3 REPLIES 3

rosarra
Altostratus
Altostratus

Thank you Nikoolayy for your prompt reply.

I've modified the iRule and now seems to work better. But now I often receive the Page expired message. Could be that I've to enable the OneConnect Profile?

Thank you again.

JRahm
Community Manager
Community Manager

The last paragraph in my article on oneconnect in relation to HTTP:

"Without OneConnect on a virtual server with HTTP, you will find that persistence data does not appear to be honored. This is because by default, the BIG-IP system performs load balancing for each tcp connection, not each HTTP request, so further requests on the same client-side connection will follow suit from the original decision. By applying OneConnect to the virtual, you effectively detach the server-side from the client-side connection after each request, forcing a new load balancing decision and using persistence information if it available."

I also have a lightboard lesson on oneconnect, hope this helps...