Home > Back-end >  A number of different datasource cases, how to deal with the database connection pool?
A number of different datasource cases, how to deal with the database connection pool?

Time:11-27

Scene description: you want to try to implement a set of database framework of fragmentation, the core idea is to maintain multiple database datasource, and then through the agent at the time of obtaining the datasource are established according to their own definition of some rules to perform the datasource (may be one, or all) of the. But most of the current database connection is used for database connection pool management, so as the case of multiple source, how to deal with the connection pool?
I now think of two schemes:
1. Each of the different database, there is a unique connection pool, (connection pool whether or not to use too much?
2. Manage all database, a connection pool (how to distinguish the different in the same connection pool database connections?)

Want to listen to everyone's opinions, ideas,

CodePudding user response:

The connection pool is to allow multiple data sources

CodePudding user response:

Their search multiple source connection pool configuration is ok

CodePudding user response:

Of new check a true eye, wait for bosses come

CodePudding user response:

Dynamic multiple data sources using the druid connection pool:
https://blog.csdn.net/songzehao/article/details/100548930

CodePudding user response:

Insert the eye and 2 (-)

CodePudding user response:

Achieve a datasource, they hold the different datasource reference, what all don't need to pipe connection pool... You concentrate on your own logic
  • Related