MySQL Forums
Forum List  »  NDB clusters

Re: JDBC and SQL node failover
Posted by: Brian Ong
Date: July 14, 2005 10:11AM

Yes, the JDBC driver can be configured for SQL node failover (I, in fact, have set this up in production - and it works!), and load-balancing.

You simply have to tell the JDBC Driver about the additional SQL nodes in your connection URL , i.e.:

jdbc:mysql://[host],[failoverhost]/[database]?failOverReadOnly=false&[otherConnectionProperties]

Since you're using the NDB storage engine, you'll want to specify failOverReadOnly=false. The default is true because if you're using replication (not the cluster) any SQL node you failover to will be a read-only slave. But in the case of MySQL cluster, all SQL nodes are read-write, so you need to change this property to allow for this.

For load-balancing you can add this property to your connection url:

roundRobinLoadBalance=true

Check out this page for more details:

http://dev.mysql.com/doc/connector/j/en/cj-configuration-properties.html

Hope this helps,
Brian

Options: ReplyQuote


Subject
Views
Written By
Posted
3134
March 14, 2005 01:26PM
1799
March 14, 2005 01:33PM
1875
July 05, 2005 05:12AM
1766
July 05, 2005 05:34PM
Re: JDBC and SQL node failover
2373
July 14, 2005 10:11AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.