Change Data Capture (CDC)
CDC vs. Database Replication
Bane Tech Engineering · 5 min read
Database replication and change data capture both move data changes from one place to another, and often rely on the same transaction logs. Their purpose is different: replication keeps copies of a database identical, while CDC turns changes into events that any system can consume, transform and act on.
Database replication
Replication maintains one or more copies of a database, usually on the same engine. It serves high availability, disaster recovery and read scaling. The replica mirrors the source structure and is typically managed by the database vendor's own tooling.
Change data capture
CDC captures individual inserts, updates and deletes and publishes them as a stream. Targets can be different databases, data warehouses, search indexes, caches, message brokers or applications, and data can be filtered or transformed on the way.
Key differences
| Replication | CDC | |
|---|---|---|
| Primary goal | Identical copy of the database | Propagate changes to other systems |
| Targets | Usually same engine | Heterogeneous: databases, streams, apps |
| Transformation | None or minimal | Filtering, mapping, enrichment |
| Granularity | Entire database or tables | Selected tables, columns or rows |
| Typical uses | HA, disaster recovery, read replicas | Integration, analytics, event-driven architecture, migrations |
Which one to choose
- Choose replication when you need a failover copy or read scaling on the same database engine.
- Choose CDC when changes must reach different systems, formats or teams.
- Use both where needed: replication for resilience, CDC for integration.
See Log-Based CDC Explained for how CDC reads changes efficiently.