From the course: Microservices: Design Patterns

Unlock the full course today

Join today to access over 24,500 courses taught by industry experts.

Shared service database

Shared service database

- While the single service, single database pattern is usually a more effective one, there are some times when you must use a shared database. The shared database pattern isn't really new, especially if you've done some application development in your life. In reality, this is an enterprise construct that is carried over into a distributed model like microservices, mainly due to contracts that have already been signed, but not always, as we'll see often in startups. There are some ways that we can pattern our data in our data store to be more effective for eventually breaking the database up. The given in this case is that all data domains exist within a single database instance. We can still treat them as separate databases, however, from both a logic as well as a code concept, even if they're in a single engine. Data distribution should be handled by the database itself. If you're deploying to multiple data centers, you need the database to handle the data synchronization across the…

Contents