HikariCP
HikariCP copied to clipboard
Using hikaricp for multiple databases(Multi tenancy)
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
Does ds.setMinimumIdle(0)
helps?
ds.setMinimumIdle(0); does not help at all. HikariCP at any given time keeps the least number of connections bound to 1 atleast.