Databases & System Design•Part 5: Real-Time Architecture, Replication & Scale (51 - 60)
Change Data Capture (CDC):
In Simple Words: Taps into database transaction logs (WAL/binlog) using tools like Debezium to stream row changes to Kafka without impacting application transaction performance.
json
// Debezium CDC event payload streamed to Kafka:
{
"before": { "id": 1, "status": "pending" },
"after": { "id": 1, "status": "completed" },
"op": "u", // Update operation
"source": { "table": "orders", "ts_ms": 1730900000 }
}