Is TCP Keepalive the only mechanism to determine a broken link?

后端 未结 5 949
北荒
北荒 2021-01-13 14:46

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 prim

5条回答
  •  盖世英雄少女心
    2021-01-13 15:24

    Another solution is to use a heartbeat on a separate socket. That way you know almost immediately if the connection is down. This is useful when your primary connection is sending streaming data with no message boundaries.

提交回复
热议问题