[e2e] tcp connection timeout

Lynne Jolitz lynne at telemuse.net
Thu Mar 2 10:46:47 PST 2006


Not all Berkeley people were for keepalive. ;-)

I've found over the years that timers are often used by engineers and programmers when they don't have a good feel for the systemic effects, so they place a timer into the design to keep the door (or signal) open as basically a get-ahead move. It's an easy thing to do.

While even a good designer might use such as a crutch at the beginning of the project, it is the sign of an ignorant designer who clings to such without good cause once the design is well-vetted.

The problem is "How do you know when a socket is active"? Say data travels on a session every few hours. If you have a keepalive poking it to check if it is active or not, you now have to determine if it is real data traveling on it, or just the keepalive.

The fault tolerant solution to this dilemma (e.g. Tandem, ...) was to place the session reconnect in the sequence in the application layer for specific applications that required such. Thus no keepalive was required (e.g. fail fast and retry). From the design standpoint this was viewed as a subcase of application restart, and not as a Layer-4 mechanism.

The fact that Postel and almost the entire Host Requirements Working Group was against it after explanation by "the programmer responsible" should have in retrospect been an obvious warning sign. But money talks, and a "Very Big Company" (VBC) funding Berkeley at the time needed a solution for their telnet drops. Of course, that VBC isn't around anymore (nor does anyone really care). But keepalive lingers on... 

Lynne Jolitz.

----
We use SpamQuiz.
If your ISP didn't make the grade try http://lynne.telemuse.net


> -----Original Message-----
> From: end2end-interest-bounces at postel.org
> [mailto:end2end-interest-bounces at postel.org]On Behalf Of Bob Braden
> Sent: Wednesday, March 01, 2006 12:29 PM
> To: end2end-interest at postel.org; kunhuang at uga.edu
> Subject: Re: [e2e] tcp connection timeout
> 
> 
> 
>  
>   *> 
>   *> Hi,
>   *> 
>   *> I recently got a TCP connection timeout error.
>   *> 
>   *> If both side don't send packets for a long time while 
> connection is open, is 
>   *> there a default time out to abort the connection?
>   *> 
>   *> Thanks a lot!
>   *> 
>   *> - Kun 
>   *> 
> 
> Sigh.  This is periodic question #13, which recurs about every 2.3
> years.  Those who have been around the Internet more than 2.3 years can
> stop reading now.
> 
> The inventors of TCP, and in particular Jon Postel, were religiously
> opposed to a TCP idle timer ("keep alive").  The knowledge of when to
> time out an idle connection belongs logically to the application layer;
> TCP itself does not know.  But the OS guys (beginning with the Berkeley
> Unix folks) disagreed on pragmatic grounds, so BSD TCP had a
> keep-alive.
> 
> When the Host Requirements Working Group came to this issue, there was
> nearly unanimous agreement with Postel, that TCP should not have a keep
> alive.  The dissenter was the programmer responsible for the BSD code,
> which probably powered the majority of hosts at the time!  So, the Host
> Requirements group set requirements on Keep-Alives that were
> designed to come as close to outlawing them as possible without
> actually outlawing them.  Thus, keep-alives must be optional, they must
> default to "off", the default timeout interval must be very large,
> etc.
> 
> Bob Braden
> 
> 


More information about the end2end-interest mailing list