Change Data Capture
also: CDC
Streaming a database’s change log to other systems — sync caches, indexes and warehouses without dual writes.
CDC tails the database’s write-ahead log and streams every insert/update/delete as events (Debezium → Kafka is the classic stack). Downstream consumers — search indexes, caches, warehouses, embeddings pipelines — stay in sync without the application writing to two places (the dual-write problem). Events arrive at-least-once and in commit order per key.
Worked example: change data capture streams every insert/update/delete out of a database by reading its transaction log (e.g. Postgres WAL via Debezium), so downstream systems — search indexes, caches, warehouses — stay in sync without dual-writes. Gotcha: reading the log gives exactly what committed, in order (no missed writes, unlike polling an updated_at column), but you must handle at-least-once delivery (dedupe on the log offset) and schema changes; the log is the source of truth — the same insight behind event sourcing.