We are trying to develop an application based on microservices. The idea is to create a good pattern and ideally I would like to develop it so that each service is freely coupled with its own database. But how would we handle the data that is common in multiple services?
Consider an example of country and state information required in multiple services.
We came up with some options here:
- Replicate the tables in each service, with a separate country administration service to manage the country data, and each other service subscribing any update (but here the data is replicated in multiple services)
- A common database for country data (but that could become a single point of failure)
- Single country management service and other services that access country data through this
What would be the ideal option to implement this? Or is there a better way to handle this scenario?