As part of a microservice-based system design, I'm struggling to decide where system configurations should reside in terms of domain ownership.
For example, let's assume I'm designing a "store system" where for simplicity I want to discuss the following domains that have today 1 microservice for:
Now I have a global setting UI menu that via this menu we are managing configurations. Example for 2 configurations:
- Orders - "remove unapproved orders after X days"
- Inventory - "make automatic inventory orders for critical components"
What is the best place to manage the configurations?
- A microservice that manages System Configurations and the Orders, Inventory microservices will read from it to apply their logic. There will be a set of "settings" APIs for this service that will be exposed to the user.
- The configurations should be managed in the orders and inventory microservices respectively and the UI should call the relevant APIs of these microservices.
What is the better approach here? In "Configurations" should be considered as a domain of its own? or the configurations should reside in each one of the services?