I'm trying to scale the database due to high traffic concerns.
I am plannig to split the initial schema into 4 schemas (Orders/Cart, Product, Customers,?) ps:I just extracted the related tables (didn't change them)
The main idea is each service would connect to its dedicated database instance instead of a single monolithic instance which would make scaling much easier and efficient.
I managed to do this by extending the service repository and using a different datasource than the default one that loaders/database provide
However I am concerned if this would cause any issues or if there is a better way of doing it.
This concern stems from the fact that the default datasource is being registered in the container as well as a pg_connection object which may be used somewhere else that would cause some misbehaving.
Ps : I am fairly new to the Medusa codebase I tried tracking down where they are used but couldn't find anything notable. However since they are being registered in the container their has to be a reason behind that.My main assumption is that third party plugins and modules are using that ?