From the course: Microservices: Design Patterns

Unlock this course with a free trial

Join today to access over 25,600 courses taught by industry experts.

Single service database

Single service database

- We will now delve into the world of data patterns in a microservices-based architecture. There are really only a few ways to solve your data needs, but we will start out with what should be the most common pattern, the single service single database pattern. As I stated before, the single-service single-database pattern should be the most common pattern for all data-domain-based services. The concept is actually very simple, but can be cost prohibitive if used with proprietary databases or improperly sized databases. The problem that we are solving with this pattern is that of scalability. In a microservices architecture, the service scalability needs should be proportional to the database's scaling needs. As load on a single service increases, the associated use of the database will also increase. This can cause you to size the database based on single-service peak needs when the entire system is underutilized. In this pattern, each data domain that you build gets its own dedicated…

Contents