What is polyglot persistence, and what are its advantages and disadvantages?
Last updated
Polyglot persistence means each microservice picks the database best suited to its data (relational, document, key-value, graph, search) instead of one shared DB.
Advantages: per-service performance optimization, independent scaling and tech evolution, and loose coupling with no shared schema.
Disadvantages: more technologies to operate, broader skills needed, and no cross-database joins or transactions (requiring sagas and eventual consistency).
- https://www.geeksforgeeks.org/system-design/top-microservices-interview-questions/
- https://www.geeksforgeeks.org/system-design/microservices-resilience-patterns/
- https://medium.com/@RichaShukla2111/saga-pattern-a-practical-guide-to-distributed-transactions-in-microservices-f4f0f27755f0
- https://dev.to/athulmr/making-rest-microservices-resilient-bulkhead-retry-circuit-breaker-in-practice-1mpl
- https://blog.bytebytego.com/p/6-more-microservices-interview-questions