Microservice Patterns | Design Patterns | Dedicated Microservice Database


Microservice and Containerization Patterns > Base Deployment Patterns > Dedicated Microservice Database
Home > Design Patterns > Dedicated Microservice Database

Dedicated Microservice Database (Erl, Naserpour)

How can a microservice have access to required data without having to compete with other microservices or consumer programs?

Dedicated Microservice Database

Problem

If a microservice is required to access a database shared by other microservices or programs, it may not be able to fulfill its performance or reliability requirements due to the unpredictability of the database’s shared access.

Solution

The microservice is provided with a dedicated database that is isolated from other microservices and programs and cannot be shared outside of the microservice’s deployment environment.

Application

The logical isolation boundary is used to logically isolate the microservice and its database, while still allowing the microservice to subscribe to events or state updates triggered by other microservices and their dedicated databases.

The microservice is provided with its own database implementation that resides within the microservice deployment environment. Access to the database is limited to the microservice only.

Dedicated Microservice Database: Microservices are deployed in their own isolation boundary with their own databases. 

Microservices are deployed in their own isolation boundary with their own databases.

The dedicated database is deployed local to the microservice, within its isolation boundary. This enables the microservice to access it with complete independence. The relationship between the microservice and any other external databases is maintained and implemented via published APIs.

This pattern can be applied using one of several pre-defined autonomy levels, as explained in the complete pattern description.



Module 10: Advanced Microservice Architecture & Containerization.

This pattern is covered in Module 10: Advanced Microservice Architecture & Containerization..

For more information regarding microservice and containerization courses and accreditation,
visit the Microservice Architect Certification program page..