From what I researched, the preferred architecture for microservices is polyglot persistence pattern. (http://martinfowler.com/bliki/PolyglotPersistence.html ). You could further read about this on following pages:
- http://martinfowler.com/articles/microservices.html#DecentralizedDataManagement
- http://microservices.io/patterns/data/database-per-service.html
As per the best practices, each micro-service should have one database private to it. There are different ways to achieve the above objective. Some of them are listed below:
- Same database system for different services. In this following could be done:
- Different set of tables specific to microservice in the same database
- Different database schema but in the same database server
- Different database server
- Each service can use different database systems. For example, RDBMS, MongoDB etc.
Following diagram represents one datastore per microservice. (courtesy: MartinFowler page on MSA)
Following is another page representing MSA best practices from NetFlix. It highlights creating separate datastore for each microservice.
https://www.nginx.com/blog/microservices-at-netflix-architectural-best-practices/
- Mean Squared Error vs Cross Entropy Loss Function - April 28, 2024
- Cross Entropy Loss Explained with Python Examples - April 28, 2024
- Logistic Regression in Machine Learning: Python Example - April 26, 2024
Leave a Reply