Home > database >  Refer to the Mysql connection pool from the library of linkage disequilibrium
Refer to the Mysql connection pool from the library of linkage disequilibrium

Time:09-19

Tomcat JDBC connection pool that is used by the database connection pool in the URL, using the database of domain names, such as: JDBC: mysql://aaa, BBB. Db: 3306/test, under the domain name to hang multiple IP from the library, started the program when the connection is established, only 1 ~ 2 has established a large number of connections from the library, the other from the repository connection basic is zero, this kind of situation will lead to traffic imbalance among different from library, some libraries under a lot of traffic, and consult, this kind of problem how to solve?
Note: try to use the JDBC: mysql: loadbalance + IP mode can realize the uniform from the repository connection, but for the sake of high availability and flexibility, or want to use the domain name to connect to the database,
  • Related