Open asampath123 opened 8 years ago
I think it is better to have one Database per service. If tomorrow we need to implement one DB as relational and another as MonoDB, we can go ahead easily. Also this approach keeps the services loosely coupled. We can expose the DB data through API's and have a new service which gets info and gives audit trails or other required analysis.
Use this syntax to post to DB. This is a json object { "userId":"soumya", ----------> username can work "reqId":10, ----------> any int "serviceId":"StormDetection", --> This is the identifier for the microservice "text":"any string less than 500 characters" }
we can consider using Hibernate in future.
Should we have one centralized DB and few other independent ones for each micro-service? I am not sure about how much load each micro-service would have in later stages. Since our registry should have complete logging data, should we consider having one centralized database ?