Anonymous Asked in Cars &Transportation · 2 weeks ago

Should microservices share code repositories?

Perhaps the most obvious strategy for a microservices project is to put each microservice and each shared library into a separate repository. Then set up the CI and CD pipelines for each repository, where every repository represents a unit of deployment. 28 авг. 2021 г.


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.

Should microservices share models?

The whole point of microservices is that they can change and scale independently. Sharing those models will force those services to iterate together, and will enforce strong coupling (bad).

Should microservices share database?

Microservices with shared databases can't easily scale. What is more, the database will be a single point of failure. 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.

Where microservices should not be used?

Microservice architecture: breaking one large, monolithic app with lots of functionality into a network of small apps that all communicate with each other. Working on large teams. The team may be building or maintaining several different streams of functionality at once.

Related Questions

Relevance
Write us your question, the answer will be received in 24 hours