When a legacy system is being replaced, its new counterpart needs the same data without asking the old application to write to both databases. Change data capture (CDC) reads the legacy database’s transaction log and streams changes as events, letting the replacement build a synchronized copy. section 12.5.2
A reliable migration pairs two phases:
- Snapshot: copy historical data from the old database to the new one, using a tool such as pg_dump or AWS DMS. section 12.5.2
- Stream: capture and replay changes made while the snapshot is underway, until both databases are synchronized. section 12.5.2
Skipping the snapshot is risky: databases can compress, roll over, or purge old transaction logs. CDC is a non-invasive alternative to application-level syncing; Debezium, built on Apache Kafka, is one named tool. section 12.5.2 section 12.5.2
Figure 12.4 The Strangler Fig Migration. Instead of a risky "Big Bang" rewrite, an API Gateway incrementally reroutes traffic to the new Microservice, while Change Data Capture (CDC) safely syncs the underlying data in the background.

Shows CDC syncing data in the background as an API Gateway incrementally routes traffic to a replacement service. section 12.5.2





