We have 25 instances of the same database facilitating different production plants in our organization. Basically, location X uses it's own copy of the database, location Y uses it's own copy, etc. The database facilitates the same functionality and persists the same type of data for each location, so a microservice that would sit on top of a database instance would to the same thing as the microservice on a different instance.
We eventually aggregate all of this information into a global data warehouse.
My question is, should we have one instance of the microservice per database and route to the correct microservice via another routing service, or should our clients just include information about what database they wish to use in request headers to a single microservice that can handle database routing internally?
The advantage to using a single service that handles routing internally is that instead of 25 instances we could have a couple instances (to manage load). Although, I am not entirely sure that having a couple load-balanced services is really an advantage.
This will be a REST based microservice.
Lastly, if there is a better alternative to these two choices and it seems within the scope of the question to mention the alternative, please do. These two choices are the paradigms I am considering at the moment.