pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chen Huajun <chenhj@cn.fujitsu.com>
To: Dave Cramer <pg@fastcrypt.com>
Cc: kaprikorn07 <bharath.spyk@gmail.com>
Cc: List <pgsql-jdbc@postgresql.org>
Subject: Re: performance problem of Failover Datasource?
Date: Fri, 14 Dec 2012 10:57:34 +0800
Message-ID: <50CA959E.4060603@cn.fujitsu.com> (raw)
In-Reply-To: <CADK3HH+TLPjrrJ=cQWqZ+0B5o96xR+sTVcvqhcDU4CjyryKG2g@mail.gmail.com>
References: <4DFA5A86.9030301@acm.org>
	<itdn5g$eu7$1@dough.gmane.org>
	<4DFA671F.2050005@acm.org>
	<4DFA9704.4000209@hogranch.com>
	<4DFAB403.5010309@acm.org>
	<4DFAB5B8.5010603@hogranch.com>
	<4DFAB9E2.4070905@acm.org>
	<1334056170219-5629626.post@n5.nabble.com>
	<1355303340886-5736270.post@n5.nabble.com>
	<50C9B102.2060208@cn.fujitsu.com>
	<CADK3HH+TLPjrrJ=cQWqZ+0B5o96xR+sTVcvqhcDU4CjyryKG2g@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>


 > Feel free to send us a patch.

OK,I will make the  patch soon.

-- 
Best Regards,
Chen Huajun

(2012/12/14 5:01), Dave Cramer wrote:
> Feel free to send us a patch.
>
> Dave
>
> Dave Cramer
>
> dave.cramer(at)credativ(dot)ca
> http://www.credativ.ca
>
>
>
> On Thu, Dec 13, 2012 at 6:42 AM, Chen Huajun <chenhj@cn.fujitsu.com <mailto:chenhj@cn.fujitsu.com>> wrote:
>
>     Hi All,
>
>
>     In the latest jdbc driver,multi backends can be assigned in the URL as following.
>
>      >With latest jdbc drivers you can simply configure multiple host:port pairs in the url separated by comma:
>      >jdbc:postgresql://host1: port1,host2:port2/test
>      >It has only the most basic failover support. When a new connection is opened the hosts are tried in round-robin until a connection is successfully established.
>
>     But there is a performance problem .if the first host is down,
>     all connecting must be blocked until connect timeout at first,
>     and then try connect to the next host.
>
>     Why not adjust the order of hosts dynamically?
>     For excample, after a successful connecting,if the target host is not the first host,
>     swap the target host and the first host.
>     And then subsequent connecting will try the most suitable host at first.
>
>
>     --
>     Best Regards,
>     Chen Huajun
>     (2012/12/12 17:09), kaprikorn07 wrote:
>
>         Hi All,
>
>         As Bruce Adams has mentioned, please let me know if there is any other way
>         to do it other than pgBouncer and pgPool.
>
>         Please help!
>
>
>
>         --
>         View this message in context: http://postgresql.1045698.n5. nabble.com/Re-Failover- Datasource-tp4496411p5736270. html
>         <http://postgresql.1045698.n5.nabble.com/Re-Failover-Datasource-tp4496411p5736270.html;
>         Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.
>
>
>
>
>
>
>     --
>     Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org <mailto:pgsql-jdbc@postgresql.org>)
>     To make changes to your subscription:
>     http://www.postgresql.org/ mailpref/pgsql-jdbc <http://www.postgresql.org/mailpref/pgsql-jdbc;
>
>







-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



view thread (13+ messages)  latest in thread

Message-ID: <50CA959E.4060603@cn.fujitsu.com>
Permalink:  ../50CA959E.4060603@cn.fujitsu.com/
Also on:    postgresql.org/message-id/50CA959E.4060603@cn.fujitsu.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: chenhj@cn.fujitsu.com, pg@fastcrypt.com, bharath.spyk@gmail.com
  Subject: Re: performance problem of Failover Datasource?
  In-Reply-To: <50CA959E.4060603@cn.fujitsu.com>
  References: <4DFA5A86.9030301@acm.org> <itdn5g$eu7$1@dough.gmane.org> <4DFA671F.2050005@acm.org> <4DFA9704.4000209@hogranch.com> <4DFAB403.5010309@acm.org> <4DFAB5B8.5010603@hogranch.com> <4DFAB9E2.4070905@acm.org> <1334056170219-5629626.post@n5.nabble.com> <1355303340886-5736270.post@n5.nabble.com> <50C9B102.2060208@cn.fujitsu.com> <CADK3HH+TLPjrrJ=cQWqZ+0B5o96xR+sTVcvqhcDU4CjyryKG2g@mail.gmail.com> <50CA959E.4060603@cn.fujitsu.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