Chapter 5. Integration Strategies

Using the Decentralized Data Management characteristic of microservices architectures, each one of our microservices should have its own separate database—which could possibly, again, be a relational database or not. However, a legacy monolithic relational database is very unlikely to simply migrate the tables and the data from your current schema to a new separate schema or database instance, or even a new database technology.

We want to evolve our architecture as smoothly as possible: it requires baby steps and carefully considered migrations in each one of these steps to minimize disruption and, consequently, downtime. Moreover, a microservice is not an island; it requires information provided by other services, and also provides information required by other services. Therefore, we need to integrate the data between at least two separate services: one can be your old monolithic application and the other one will be your new microservice artifact.

In this chapter, we will present a set of different integration strategies collected from personal experience and from successful integrations delivered by companies worldwide. Most of these strategies assume that you will be also using a relational database in your new microservice. And you should not be surprised with this choice of technology: relational databases are a solid, mature, battle-tested technology. I would even suggest it as your first choice when dealing with breaking monolithic database ...

Get Migrating to Microservice Databases now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.