Change Data Capture (CDC) • Log-based CDC (Binlog, WAL)Easy⏱️ ~2 min
What is Log-Based Change Data Capture (CDC)?
Definition
Log-Based Change Data Capture (CDC) reads a database's internal transaction log to capture every insert, update, and delete as it happens, converting these changes into structured events that other systems can consume in near real time.
Typical End to End Performance
50-200ms
LATENCY
0%
OVERHEAD
💡 Key Takeaways
✓Reads the database's internal transaction log (binlog in MySQL, WAL in PostgreSQL) instead of querying tables directly
✓Captures all change types (inserts, updates, deletes) with before and after values in near real time, typically 50 to 200 milliseconds end to end
✓Adds zero overhead to the primary database because it uses the same log already written for durability and replication
✓Preserves transaction ordering and completeness, giving you the exact same ground truth that database replicas use
✓Enables multiple downstream systems (search, analytics, caching) to consume changes independently without touching the primary database
📌 Examples
1A MySQL database at 20,000 writes per second generates 5 to 20 MB per second of binlog data. A CDC connector reads this stream and publishes structured events to Kafka topics, which downstream consumers process within 100 to 300 milliseconds for use cases like cache invalidation and search indexing.
2PostgreSQL enables logical decoding on its Write Ahead Log (WAL), allowing a CDC connector to subscribe and see row level changes (user 123 updated email from [email protected] to [email protected]) rather than low level page modifications.