pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mikko Tiihonen <mikko.tiihonen@nitorcreations.com>
To: pgsql-jdbc@postgresql.org
Subject: Connection-fail-over
Date: Thu, 17 May 2012 20:00:43 +0300
Message-ID: <4FB52EBB.4060309@nitorcreations.com> (raw)

Hi,

I have been thinking of adding connection fail-over support to the jdbc driver. What this means is that there would be a way to specify more than host:port pair 
to connect to. This will become handy with high-availability installations.

Currently the limitation of hostname means that there has to be a virtual ip address that is moved with the active backend, which is a complex solution that can 
break.

If we have list of hostname:port pairs we just have to make sure that only the master database allows connections from the jdbc clients.

Before I implement this I would like to first ask opinions on how the connection url should look like.

Current syntax is:

jdbc:postgresql://hostname:port/database?options

Which of these should we support:

A) jdbc:postgresql://hostname1:port1,hostname2:port2/database?options
B) jdbc:postgresql://hostname1,hostname2:port/database?options
C) jdbc:postgresql://hostname1:port1/database?&failoverhost=hostname2:port2&options
D) some other?

-Mikko



view thread (5+ messages)  latest in thread

Message-ID: <4FB52EBB.4060309@nitorcreations.com>
Permalink:  ../4FB52EBB.4060309@nitorcreations.com/
Also on:    postgresql.org/message-id/4FB52EBB.4060309@nitorcreations.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: mikko.tiihonen@nitorcreations.com
  Subject: Re: Connection-fail-over
  In-Reply-To: <4FB52EBB.4060309@nitorcreations.com>
  References: <4FB52EBB.4060309@nitorcreations.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