From: | Bruce Adams <bruce(dot)adams(at)acm(dot)org> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Failover Datasource? |
Date: | 2011-06-17 02:20:18 |
Message-ID: | 4DFAB9E2.4070905@acm.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Yes, Oracle's JDBC drivers support insanely long JDBC URLs which allow
specifying a whole cluster of database servers, what the failover
policies are, including various timeouts, load balance weights and more.
A single JDBC URL for Oracle can be a thousand characters or more. I
suspect the other database vendors (I specifically know about IBM DB2
and MySQL) have followed Oracle's lead here.
This page has a simple example:
http://programmersjournal.blogspot.com/2008/08/jdbc-connection-string-for-oracle-rac.html
On 06/16/2011 10:02 PM, John R Pierce wrote:
> On 06/16/11 6:55 PM, Bruce Adams wrote:
>> In principal, I agree; in practice, that's not the way it's been done
>> in the Java application server world.
>>
>> I have two readily available Java database connection pool
>> implementations available: the one bundled with Apache Tomcat and
>> Hibernate's c3p0. Neither of these directly support failover. They
>> each expect the lower level JDBC driver to deal with failover. (This
>> is true of BEA WebLogic and IBM WebSphere as well, at least as of a
>> few years ago when I last used them intensely.)
>>
>> What I'm looking for is very standard stuff in the Java application
>> server world. The JDBC driver handles failover and/or load balancing
>> to multiple backend database servers.
>
> it just seems to me that the individual client drivers shouldn't be
> what is tracking the state of the server cluster. I can't imagine
> the driver layer could do more than 'try connecting to server 1, if
> that fails, try server 2'... if server 1 is dead and not responding,
> this is going to be painfully slow and result in minute long TCP
> connection timeouts on each connect.
>
> Do oracle jdbc drivers support this multiple-server notation, same as
> shown here earlier for mysql?
>
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas Schmitz | 2011-06-21 13:08:11 | bytea performance tweak |
Previous Message | John R Pierce | 2011-06-17 02:02:32 | Re: Failover Datasource? |