Forum Discussion
David_Bradley_2
Nimbostratus
Mar 07, 2010Fault Tolerant long-lived TCP connections
Here's my story. I have several hundred long-lived client TCP connections to two Tibco RVD servers. (don't ask why we're not just using RVD in a multicast arrangement. Long story.) Clients can conn...
hoolio
Cirrostratus
Mar 07, 2010Hi David,
It sounds like you want to reselect a new pool member if the serverside connection is closed before the clientside connection is.
As you found, a health monitor and the 'action on service down' pool setting would happen too late to have any reliable effect on a single TCP connection.
Ideally, you'd be able to use an iRule which calls LB::reselect from the SERVER_CLOSED event. However, I'm not sure this is supported or would work. The wiki page for the SERVER_CLOSED event (Click here) doesn't show much hope as the LB::reselect command isn't listed there. A quick test shows the syntax parser doesn't allow it. And when you bypass the parser, it doesn't seem to work. Here is an apparently non-working example:
when CLIENT_ACCEPTED {
Try to reselect a server
set reselect 1
log local0. "[IP::client_addr]:[TCP::client_port]: New connection to [IP::local_addr]:[TCP::local_port]"
}
when LB_SELECTED {
log local0. "[IP::client_addr]:[TCP::client_port]: Selected server info: [LB::server]"
}
when SERVER_CONNECTED {
log local0. "[IP::client_addr]:[TCP::client_port]: Connected server info: [IP::server_addr]:[TCP::server_port]"
}
when SERVER_CLOSED {
log local0. "[IP::client_addr]:[TCP::client_port]: Server connection closed"
if {$reselect}{
log local0. "[IP::client_addr]:[TCP::client_port]: Trying reselect"
set lb_cmd "LB::reselect"
eval $lb_cmd
}
}
when CLIENT_CLOSED {
Do not try to reselect a server if the client closed the connection first
set reselect 0
log local0. "[IP::client_addr]:[TCP::client_port]: Client connection closed"
}
Assuming this won't work, the best I can think of are ways to reduce the chance that LTM will close an idle connection. These configuration options are related to idle timeouts on the TCP and SNAT profiles:
SOL7606: Overview of BIG-IP LTM idle session timeouts
https://support.f5.com/kb/en-us/solutions/public/7000/600/sol7606.html
Aaron
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