From owner-freebsd-current Fri Jun 4 23:49: 9 1999 Delivered-To: freebsd-current@freebsd.org Received: from peterw.yahoo.com (peterw.yahoo.com [206.132.89.237]) by hub.freebsd.org (Postfix) with ESMTP id E693B14FEF for ; Fri, 4 Jun 1999 23:49:05 -0700 (PDT) (envelope-from peter@netplex.com.au) Received: from netplex.com.au (localhost.yahoo.com [127.0.0.1]) by peterw.yahoo.com (8.9.3/8.9.2) with ESMTP id XAA07499; Fri, 4 Jun 1999 23:44:16 -0700 (PDT) (envelope-from peter@netplex.com.au) Message-Id: <199906050644.XAA07499@peterw.yahoo.com> X-Mailer: exmh version 2.0.2 2/24/98 To: "David Schwartz" Cc: "Poul-Henning Kamp" , current@FreeBSD.ORG Subject: Re: net.inet.tcp.always_keepalive on as default ? In-reply-to: Your message of "Fri, 04 Jun 1999 22:48:17 PDT." <000101beaf17$026896f0$021d85d1@whenever.youwant.to> Date: Fri, 04 Jun 1999 23:44:16 -0700 From: Peter Wemm Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "David Schwartz" wrote: > > > Well, we've heard various opinions and I think we can conclude that: > > > > 2. That server applications should have keepalives enabled. > > Well, I certainly don't agree with that. Many server applications (web > servers, mail servers, etcetera) already have data timeouts, which makes > keepalives redundant. Huh? The keepalive option *is* a kind of data timeout.. It's a failsafe so that if nothing has been heard for a while then it explicitly does a check to see if the network connection is still valid. Of course a server app is free to implement it's own data timeouts, but it shouldn't have to reinvent what the kernel can do very well already and is very difficult to do in userland. There are several sorts of timeouts that server apps *may* want: - Some sort of upper bound on a session time, eg: a fingerd session may not last more than 1 hour, regardless of whether it's doing something. Something like a http server might put an upper limit of something like 24 hours - if it is too small and it will interfere with large downloads. - Some sort of idle timeout, eg: a smtp server may want to time out after 10 minutes of not recieving a command. - A way of detecting a stalled or rebooted client. This is what keepalive does. It lets you detect a lost connection before some other longer timeout (eg: 24 hours) kicks in. > In my opinion, in the vast majority of cases, data timeouts are more > logical than keepalives. 'telnetd' being the most obvious exception. Telnetd is the worst example. Just because I have not typed something for two hours is no indication that the session should be closed. Only the kernel can test the validity of the network link in this case. However, of I drop a link or reboot, then I do want it cleaned up in a timely fashion. > DS Cheers, -Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message