Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!bloom-beacon!EXPO.LCS.MIT.EDU!rws From: rws@EXPO.LCS.MIT.EDU Newsgroups: comp.windows.x Subject: Re: Why does X not use SO_KEEPALIVE? Message-ID: <8905241247.AA00833@expire.lcs.mit.edu> Date: 24 May 89 12:47:32 GMT References: <7992@boring.cwi.nl> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 27 Is there a good reason not to set SO_KEEPALIVE? I've probed a TCP/IP wizards list about this. While there doesn't seem to be unanimity, there is clearly a sizable contingent that believe this feature is evil, and that even it is deemed necessary in certain situations, "indiscriminant" use (e.g. automatically in all X connections) is evil. Here are excerpts from a draft Requirements for Internet Hosts RFC: Implementors MAY include "keep-alives" in their TCP implementations, although this practice is not universally accepted. If keep-alives are included, the application MUST be able to turn them on or off for each TCP connection, and they MUST default to off. The TCP specification does not include a keep-alive mechanism because it could: (1) cause perfectly good connections to break during transient Internet failures; (2) consume unnecessary bandwidth ("if no one is using the connection, who cares if it is still good?"); and (3) cost money for an Internet path that charges for packets. A TCP keep-alive mechanism should only be invoked in network servers that might otherwise hang indefinitely and consume resources unnecessarily if a client crashes or aborts a connection during a network partition.