Search⌘ K
AI Features

Shared Kernel

Explore the shared kernel pattern in Domain Driven Design to learn how common technical concerns like logging and communication can be shared between microservices. Understand its benefits such as code reuse and streamlined development, as well as challenges like complexity and the need for team communication.

Let us assume that a team defines microservices based on the bounded contexts they find. As they start to build these services, they notice that many of them share the same logic.

During the construction of components such as microservices, we deal with concerns of logging, security, communication, and so on. These concerns are the common logic that can be shared between those components.

The space of this problem is shown in the image above. It depicts how two components that are evolved by two different teams share some logic (red lines). They have their own logic, but these two teams might create redundant ...