HikariCP icon indicating copy to clipboard operation
HikariCP copied to clipboard

Using hikaricp for multiple databases(Multi tenancy)

Open airtonpcj opened this issue 3 years ago • 2 comments

I developed a multi tenancy application where the application communicates with several databases using springboot. Is it possible to make the connection pool used only in the databases that are active at that moment? that is, connections need to be dynamic to avoid idleness.

for example:

The application has 15 registered databases. but at that time only 3 are in use, so redirect the connections to those 3 if a new database is used hickari itself will take an idle connection and use it in this new database and when it is finished using the connection

airtonpcj avatar Jan 13 '21 13:01 airtonpcj

Does ds.setMinimumIdle(0) helps?

quaff avatar Feb 02 '21 08:02 quaff

ds.setMinimumIdle(0); does not help at all. HikariCP at any given time keeps the least number of connections bound to 1 atleast.

murtaza13 avatar Nov 19 '21 17:11 murtaza13