Is shared database an Antipattern?
- What is a shared database?
- Is database a microservice?
- Why microservices should not share database?
- Should two microservices share a database?
What is a shared database?
A Shared Database allows you to store your documents in your favorite relational (SQL) database rather than on the file system. This means that multiple users can concurrently use the same synchronized storage location without any problems.
Is database a microservice?
Yes. In a microservice architecture (MSA) services own their data. A service's database is part of its implementation and is private. The data is exposed indirectly via the service's API.
Why microservices should not share database?
Microservices with shared databases can't easily scale. Changes related to the database could impact multiple services. Besides, microservices won't be independent in terms of development and deployment as they connect to and operate on the same database.
Should two microservices share a database?
You are not likely to benefit from a Microservices architecture if all the services share the same database tables. This is because you are effectively tightly coupling the services. If a database table changes all the services will have to change.
Related Questions
-
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago