I have a monolith application on a server and I want to break it into multiple microservices.
Because of that for the moment I have to use the same database for all the microservices and each microservice accessing only his own tables.
So my question is how can I reuse the database connection among microservices and still keep the independently of one another because at some point in the future I may want for some of them to use another database .
I ask this question because I think is an overhead to make a new database connection for each microservice if they all use the same database because a single page logic can use more then 10-20 microservices .