CDC (change data capture)
Reading committed changes from a database’s own transaction log and streaming them as events to other systems.
Instead of polling a table for new rows, a CDC tool such as Debezium follows the Postgres write-ahead log or the MySQL binlog and emits each insert, update and delete. It has a short delay and puts no polling load on the database, and it is a common way to run an outbox relay or feed a search index or a warehouse. The costs are another piece of infrastructure and coupling to database internals: a schema change can break consumers.
Related terms
- WAL (write-ahead log): A database’s log of every change, written before the data files, which makes crash recovery, replication and point-in-time restore possible.
- Transactional outbox: Saving an event to an outbox table in the same database transaction as the change itself, then publishing it to the broker separately.
- Eventual consistency: A guarantee that copies of data will agree once updates stop arriving, but may briefly show different values in the meantime.
