From: Gregory Stark <stark@enterprisedb.com>
To: Oliver Jowett <oliver@opencloud.com>
Cc: Toru SHIMOGAKI <shimogaki.toru@oss.ntt.co.jp>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: proposal: setKeepAlive
Date: Sun, 10 Feb 2008 01:04:00 +0000
Message-ID: <87r6flk4fz.fsf@oxford.xeocode.com> (raw)
In-Reply-To: <47AE36DD.9050102@opencloud.com>
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>
"Oliver Jowett" <oliver@opencloud.com> 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!
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: stark@enterprisedb.com, oliver@opencloud.com, shimogaki.toru@oss.ntt.co.jp
Subject: Re: proposal: setKeepAlive
In-Reply-To: <87r6flk4fz.fsf@oxford.xeocode.com>
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> <87r6flk4fz.fsf@oxford.xeocode.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox