Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Aug 2006 03:00:54 -0500 (CDT)
From:      Mike Silbersack <silby@silby.com>
To:        Chris <chrcoluk@gmail.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Long keepidle time
Message-ID:  <20060830025222.A86833@odysseus.silby.com>
In-Reply-To: <3aaaa3a0608172143l103dafe0hf4c0fbc8044b0d01@mail.gmail.com>
References:  <44DD1909.40703@matteworld.com> <20060811203041.E44075@odysseus.silby.com> <3aaaa3a0608172143l103dafe0hf4c0fbc8044b0d01@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Fri, 18 Aug 2006, Chris wrote:

> whats the point of keeping a connection alive (hung) to a dead network
> for 2 hours tho? That I dont understand either.
>
> Chris

I used to wonder that myself.  From the perspective of minimizing the 
number of open sockets, it makes sense to kill connections to dead 
networks as quickly as possible.

However, there are other things to consider:

1.  Is it TCP's problem to care whether or not the connection is alive? 
Most applications that open a large number of connections (web servers, 
etc) are smart enough to notice that the other end of the connection has 
gone silent and automatically terminate the connection.

2.  If your application tries to transmit data to the dead machine, the 
TCP retransmit timer will cause the connection to be terminated, so there 
is no need for keepalive to help in that case.

3.  In the case of telnet / ssh sessions, you don't want keepalive being 
too active.  When I go to bed, my ssh sessions will be idle for at least 6 
hours.  If my cable modem provider decides to do maintenance during that 
time, it would be nice if the ssh sessions survive.  If keepalive was 
checking every 5 minutes, it might needlessly terminate the connection.

So, in summary, there are many opinions about keepalives.  That's why 
everything about them is tunable. :)

Mike "Silby" Silbersack



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060830025222.A86833>