Re: performance problem of Failover Datasource? - Mailing list pgsql-jdbc

From Chen Huajun
Subject Re: performance problem of Failover Datasource?
Date
Msg-id 50CA959E.4060603@cn.fujitsu.com
Whole thread Raw
In response to Re: performance problem of Failover Datasource?  (Dave Cramer <pg@fastcrypt.com>)
Responses Re: performance problem of Failover Datasource?  (Chen Huajun <chenhj@cn.fujitsu.com>)
List pgsql-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
untila 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>
>
>







pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: performance problem of Failover Datasource?
Next
From: Haifeng Liu
Date:
Subject: Fwd: [ADMIN] Confuse about the behaveior of PreparedStatement.executeBatch (jdbc)