HomeInterview QuestionsCdc, Data Integration, Change Data Capture

How would you design a system to capture changes using Change Data Capture (CDC) from a source database?

🟡 Medium System Design Mid level
1 Times asked
Jul 2026 Last seen
Jul 2026 First seen

💡 Model Answer

To capture changes using CDC, first identify the source database and the type of changes needed (insert, update, delete). Choose a CDC method: log-based (most efficient and non-intrusive) or trigger-based (simpler but can add overhead). For log-based CDC, use the database’s transaction log (e.g., MySQL binlog, PostgreSQL WAL, Oracle redo logs). Tools like Debezium, AWS DMS, or Kafka Connect can tail these logs and emit change events. The pipeline typically includes:

Key decisions: choose a broker that matches latency and throughput needs; use schema registry for evolving schemas; secure the pipeline with encryption and IAM roles; monitor lag and error rates. This architecture scales horizontally, provides near real-time replication, and supports downstream analytics or microservices that react to data changes.

Sign in to unlock the rest of this answer

This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.

🎤 Get questions like this answered in real-time

Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers on a discreet on-screen overlay.

Get Assisting AI — Starts at ₹500