I recently ran into a issue where intermediate link betweeen a TCP server and client was down. The client has the requirement of connecting to a secondary server if the primary server is down. When the primary server is bought down (Ex ..by doing ^C on the terminal), there is TCP shutdown sequence that gets through and client sucessfully detects the broken link and tries the secondary. However if the intermediate link goes down ,the client and server would be unaware of it. The only way the client can detect is when its TCP bufferes gets filled up with failed 'send' operations.
As a solution to this the 'TCP Keepalive' mechanism has been used. This works satisfacatorily.
My question is 'TCP Keepalive' the only solution?
-Prabhu