CDC (Change Data Capture)
A pattern for capturing every row change (insert/update/delete) in a database and streaming it as an event to other systems — often via the database's transaction log. Enables real-time sync to search indexes, data warehouses, caches, and microservices.
Method: log-based CDC reads the WAL (Postgres) or binlog (MySQL) → no extra load on the application, captures everything. Alternatives (worse): polling on updated_at or triggers. Tools: Debezium (open source, most popular, runs on Kafka Connect), Fivetran, AWS DMS. Use case: keep Elasticsearch in sync with Postgres, feed a data warehouse in real time, the "outbox pattern" for reliable event publishing from microservices. Distinct from batch ETL (CDC is continuous + row-level). Enables a "database as a stream" mindset where every change becomes an event.