pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Gregory Stark <stark@enterprisedb.com>
Cc: Toru SHIMOGAKI <shimogaki.toru@oss.ntt.co.jp>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: proposal: setKeepAlive
Date: Sun, 10 Feb 2008 12:27:25 +1300
Message-ID: <47AE36DD.9050102@opencloud.com> (raw)
In-Reply-To: <87zlu9k9c0.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>

Gregory Stark wrote:

> The local case is precisely where you wouldn't want to use keep-alives. When
> the server does come back up you'll get RSET packets and the connections will
> die.

This does assume that the server is not down because it's caught fire..

>> Keepalive helps a little but it's certainly not perfect. I ended up doing
>> all the dead server detection at a higher level in the end.
> 
> I think you're doing exactly what you have to do. You certainly don't want to
> predicate failover on simple network reachability. You want to base it on the
> application actually functioning. Network reachability is both too sensitive
> (keep-alive packets could be dropped due to congestion) and not sensitive
> enough (if the application crashes the host may still be reachable).

For the environment I'm running in, network congestion sufficient to 
drop multiple keepalive packets is equivalent to server failure anyway.

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. You have to tune app-level 
timeouts to take account of the normal response time of the app, which 
might be quite different to the normal response time of the network.

-O



view thread (11+ messages)  latest in thread

Message-ID: <47AE36DD.9050102@opencloud.com>
Permalink:  ../47AE36DD.9050102@opencloud.com/
Also on:    postgresql.org/message-id/47AE36DD.9050102@opencloud.com

 · 

reply

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: oliver@opencloud.com, stark@enterprisedb.com, shimogaki.toru@oss.ntt.co.jp
  Subject: Re: proposal: setKeepAlive
  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>

* 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