Pattern 34 / FLOW

Change Data Capture (CDC)

Use this when letting other systems react to database changes reliably.

Pressure
Letting other systems react to database changes reliably
Mechanism
Read the database log or change stream and publish inserts/updates/deletes as events
Toll
Schema changes, ordering, replay, and backfills need care
Architecture plate34
Diagram for Change Data Capture (CDC)
Executive brief

Change Data Capture (CDC) fits when letting other systems react to database changes reliably. Mechanism: read the database log or change stream and publish inserts/updates/deletes as events. Use it for search indexing, cache updates, replication, auditing, and warehouse sync. The toll: schema changes, ordering, replay, and backfills need care.

Use when

Search indexing, cache updates, replication, auditing, and warehouse sync.

Example

Debezium streaming postgresql changes into kafka.

Review framing

Describe the pressure first, then the mechanism, then the cost. That keeps the design grounded.

Same pressure family

Data Processing Patterns

31MapReduce32Stream Processing33Lambda Architecture
โ† 3335 โ†’