Anonymous
Asked in
Cars &Transportation
·
2 weeks ago
Is it a good idea for microservices to share a common database?
Contents
- Should microservices share a database?
- Can we use same database in microservices?
- Should microservices share common code?
Should microservices share a database?
Fundamentals. By definition, microservices should be loosely coupled, scalable, and independent in terms of development and deployment. Therefore, the database per service is a preferred approach as it perfectly meets those requirements.
Can we use same database in microservices?
Yes, it's possible to integrate a database for microservices. You can create a single shared database with each service accessing data using local ACID transactions.
Should microservices share common code?
The general guideline in microservices is to not share code. Things that can be shared are libraries that don't changed very often like US States, color, etc. To answer your question what about the code for the communication between the microservices , I would say not to share this code.
Related Questions
Relevance
-
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
Write us your question, the answer will be received in 24 hours