MySQL Forums
Forum List  »  Connector/JDBC and Java

Re: Inquiry about using mysql router with java (tomcat server)
Posted by: Mark Matthews
Date: January 18, 2017 09:53AM

Hi,

MySQL Router's load balancing isn't designed to work with persistent connections, it load balances when the connection is created, it doesn't inspect packets so it can't load-balance already-created connections.

When you use an application server's connection pool it creates persistent connections, so these won't work with MySQL Router.

Connector/J does have built-in load balancing options (Fabric-aware, plain load balancing, and read/write-aware load balancing). These options work better with Java applications and connection pools. See https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-multi-host-connections.html for more information.

-Mark

Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html

Options: ReplyQuote


Subject
Written By
Posted
Re: Inquiry about using mysql router with java (tomcat server)
January 18, 2017 09:53AM


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.