Select node based on URI value
Hi Everyone,
I have a HTTPS / SSL web app, the end user is LB across a server farm with persistence, this works fine. It's a kind of remote support application.
When a phone call for remote support comes in, the app support guys fire off a HTTPS / SSL session. This session must connect to the same server the end user is connected to.
Working in the lab:
1. End user request https://server.domain.net/app is LB round robin across 10 servers.
2. App support gets request to help user xxx, we know this user is actually talking with server 7.
3. App support connects to https://server.domain.net/app?server=7.
Under development:
4. F5 iRule needs to read the URI "?sessionServer=7" and direct the entire session to server 7. Needs to be persistent on the destination server until the end user or app support guy drop off.
iRule code:
when HTTP_REQUEST {
log local0. "Http query is [HTTP::uri] "
if {[HTTP::uri] contains "/?server=7" } {
log local0. "*** Request is for server 7 *** "
node 192.168.1.7 80
}
if {[HTTP::uri] contains "/?server=8" } {
log local0. "*** Request is for server 8 *** "
node 192.168.1.8 80
}
}
My question - is there a better way to do this ? I'll need 1 entry per server. Will mangling HTTP_REQUEST based on the URI + a persistence profile always send the traffic to the same place ? My thought is doing this under when LB_SELECTED would be a one time per connect request, and therefore lower overhead than by http::request.
FWIW:
SSL terminates on the F5.
Version is 10.2.0
I'm a complete noobie to F5.