Forum Discussion
Jeff_47438
Altocumulus
Dec 06, 2013Merge two separate TCP connections on the client side to one single threaded TCP connection on the server side.
I have tried OneConnect but the idle TCP timeout/reuse is not really what I am after. We have two servers that need to dual home their TCP connections on port destination 2066 to a terminal server. T...
IheartF5_45022
Nacreous
Dec 12, 2013One last crack at this. I haven't tested it sorry, but the logic makes sense to me - basically each TCP connection, the 2 * clientside ones and the serverside one, will spend nearly all their time in blocking mode 'collecting' data from their respective endpoints. When they have client data to send they have to grab a flag indicating that they have the serverside connection now.
If this doesn't work I can raise another forum question pointing to this one to see if anyone else has any ideas.
when CLIENT_ACCEPTED {
Collect the whole request (this will trigger CLIENT_DATA)
if {$debug} {log local0. "[IP::remote_addr]:[TCP::remote_port]"}
TCP::collect
}
when CLIENT_DATA {
We have the whole response - wait for the serverside connection to be free, then release the request, and release the session table lock. Then collect again.
while {[table lookup "fProxyinProgress"] != ""} {
if {$debug} {log local0. "Request in progress - wait 50ms"}
after 50
}
if {$debug} {log local0. "Setting flag for [IP::remote_addr]:[TCP::remote_port]"}
Set session table lock
table set "fProxyinProgress" "1" 1
TCP::release
TCP::collect
}
when SERVER_CONNECTED {
TCP::collect
}
when SERVER_DATA {
We have the whole response - release it, and release the session table lock
table delete "fProxyinProgress"
TCP::release
Start collecting the next server response
TCP::collect
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects