Inferensys

Glossary

Change Data Capture (CDC)

Change Data Capture (CDC) is a set of software design patterns used to identify and track row-level changes in source database tables and stream those changes to downstream systems in real time.
Data scientist building training data pipeline on laptop, data preprocessing visible, technical workspace.
REAL-TIME DATA INTEGRATION

What is Change Data Capture (CDC)?

Change Data Capture is a set of software design patterns used to identify and track row-level changes in source database tables and stream those changes to downstream systems in real-time.

Change Data Capture (CDC) is a data integration pattern that identifies, captures, and delivers row-level modifications—INSERT, UPDATE, and DELETE operations—from a source database's transaction log to downstream systems with minimal latency. Unlike batch-based extraction, CDC reads directly from the database's native replication log, enabling non-intrusive, low-overhead change detection without impacting operational workloads.

CDC powers real-time use cases by feeding event streams into platforms like Apache Kafka or Amazon Kinesis, where they drive event stream processing, sessionization, and real-time customer segmentation. This architectural pattern eliminates the latency of periodic bulk extracts, ensuring that propensity scoring and next-best-action engines operate on current data rather than stale snapshots.

CORE MECHANISMS

Key Characteristics of CDC

Change Data Capture is defined by its ability to track and stream row-level mutations. The following characteristics distinguish CDC from bulk batch replication.

01

Log-Based Capture

The most efficient CDC method reads directly from the database transaction log. This approach captures INSERT, UPDATE, and DELETE operations with minimal latency and zero impact on source application performance. Unlike trigger-based methods, log-based capture does not require schema changes to the source tables.

Sub-millisecond
Capture Latency
02

Push-Oriented Delivery

CDC operates on a push model, streaming changes to downstream systems as they happen. This contrasts with batch-oriented pull models. The immutable, ordered stream of events is typically published to a distributed log like Apache Kafka, allowing multiple independent consumers to subscribe to the same feed.

03

State and Schema Evolution

CDC pipelines must handle schema evolution gracefully. As source tables add or modify columns, the capture process and downstream consumers must adapt without data loss. A Schema Registry is critical for managing compatibility and ensuring the structural integrity of the change stream over time.

04

Exactly-Once Semantics

Enterprise-grade CDC guarantees idempotent processing. This ensures that in the event of a network failure or crash, replaying the log does not introduce duplicates. Achieving exactly-once semantics requires tight coordination between the capture agent and the stream processor to manage checkpoints and offsets.

05

Before-Image Support

To enable complex downstream reconciliation, CDC often captures the before-image (the row state prior to the mutation) alongside the after-image. This is essential for auditing, conflict resolution in bi-directional replication, and training machine learning models on the delta of a change.

06

Filtering and Routing

CDC is not just a raw firehose. Mature implementations allow for content-based filtering and routing. For example, a single capture stream can be partitioned so that only changes to high-value customer tables are routed to the real-time personalization engine, while all other changes go to the data lake.

CHANGE DATA CAPTURE

Frequently Asked Questions

Clear, technical answers to the most common questions about implementing and operating Change Data Capture (CDC) patterns in modern data architectures.

Change Data Capture (CDC) is a set of software design patterns used to identify and track row-level changes—INSERT, UPDATE, and DELETE operations—in source database tables and stream those changes to downstream systems in real time. Rather than relying on expensive batch queries that scan entire tables for modifications, CDC operates by reading the database's native transaction log (such as MySQL's binlog, PostgreSQL's write-ahead log, or SQL Server's transaction log). A CDC connector parses this log, extracts committed row mutations, serializes them into a structured event, and publishes them to a distributed streaming platform like Apache Kafka. Downstream consumers—data warehouses, caches, search indexes, and microservices—consume these events to maintain eventually consistent, up-to-date materialized views without placing additional query load on the source database.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.