Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 35CB62E3721 for ; Sat, 9 Feb 2008 21:04:08 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 53412-03 for ; Sat, 9 Feb 2008 21:03:57 -0400 (AST) Received: from oxford.xeocode.com (unknown [87.127.95.196]) by postgresql.org (Postfix) with ESMTP id 6CCAF2E371F for ; Sat, 9 Feb 2008 21:04:04 -0400 (AST) Received: from localhost ([127.0.0.1] helo=oxford.xeocode.com) by oxford.xeocode.com with esmtp (Exim 4.69) (envelope-from ) id 1JO0bx-00040G-2R; Sun, 10 Feb 2008 01:04:01 +0000 To: "Oliver Jowett" Cc: "Toru SHIMOGAKI" , Subject: Re: proposal: setKeepAlive In-Reply-To: <47AE36DD.9050102@opencloud.com> (Oliver Jowett's message of "Sun\, 10 Feb 2008 12\:27\:25 +1300") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Draft-From: ("nnimap+mail01.enterprisedb.com:INBOX" 63484) References: <47AC666C.9070704@oss.ntt.co.jp> <87abmb2weo.fsf@oxford.xeocode.com> <47AE2D07.50904@opencloud.com> <87zlu9k9c0.fsf@oxford.xeocode.com> <47AE36DD.9050102@opencloud.com> From: Gregory Stark Organization: EnterpriseDB Date: Sun, 10 Feb 2008 01:04:00 +0000 Message-ID: <87r6flk4fz.fsf@oxford.xeocode.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/31 X-Sequence-Number: 18238 "Oliver Jowett" writes: > For the environment I'm running in, network congestion sufficient to drop > multiple keepalive packets is equivalent to server failure anyway. Well, it could just mean someone is doing an ftp transfer and you got unlucky with which packets got dropped. > Agreed that you want application-level tests anyway, it's just that if there > are network problems I would prefer to hear about them sooner rather than later > - it seems a little silly to have the information available at the TCP level, > but ignore it. Well you don't just "hear about" it. You get your connection reset. Effectively you guarantee that there are network problems even if there weren't really problems before. The worst offender on this front is SSH. Whenever my DSL modem reboots or my wireless modem gets interference my SSH connections often hang and I have to reconnect. I think this is actually due to the application-level keep-alives that SSH is doing, not TCP keep-alives, but it's the same principle. SSH turned an situation where no error was necessary into an error that required manual recovery. The various instant messenger systems are also frequent offenders but at least they have a reasonable excuse. They have to deal with millions of users on dynamic addresses which appear and disappear without warning. If they stuck around waiting for you to come back ten minutes later they would be waiting on thousands of such dead connections. That's what TCP keep-alives are for, but they're a trade-off between reliability and wasted resources. The instant messenger systems don't put much of a premium on reliability and they can just reconnect anyways. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training!