Course contentsShow
← Cloud and Infrastructure
Lesson 2809 of 2,98961. Cloud MigrationFree lesson

Continuous Data Replication and CDC

Implement change data capture to keep source and target in sync during cutover windows.

Continuous Data Replication and CDC

What you'll learn: How to use Change Data Capture (CDC) to maintain real-time synchronization between source and target databases during migration cutover periods.

The Cutover Challenge

During cloud migrations, you face a critical window: the time between starting your migration and fully switching over to the new environment. Applications continue writing to the source database while you're copying data to the target. Without continuous replication, you'd have data drift—changes made after the initial copy wouldn't exist in your new cloud database.

What is Change Data Capture?

CDC is a technique that monitors and captures every insert, update, and delete operation on your source database in real-time. Think of it as a surveillance camera recording every transaction—instead of re-copying the entire database repeatedly, CDC only transmits the changes (the deltas) to keep both environments synchronized.

How CDC Maintains Sync During Migration

Most Database Migration Services (from the previous lesson) include built-in CDC capabilities. They work by:

  1. Reading transaction logs or using database triggers to detect changes
  2. Streaming those changes continuously to the target database
  3. Applying changes in order to maintain consistency
  4. Handling schema differences when performing heterogeneous migrations

This allows you to:

  • Perform the initial full data load while applications run normally
  • Keep source and target in sync for days or weeks during testing
  • Minimize downtime to just the final cutover (often minutes instead of hours)

The Cutover Window

With CDC running, your cutover becomes surgical: stop writes to the source, let CDC catch up completely (usually seconds), verify synchronization, then redirect traffic to the target. No massive data copy during a maintenance window.

Key Takeaway: CDC transforms risky migrations with long downtimes into controlled, low-risk transitions by continuously streaming only the changes from source to target, keeping databases synchronized until the final cutover moment.