Design Change Data Capture From Order Databases to a Warehouse

Last updated: November 29, 2026

Quick Overview

Design a pipeline that streams every insert, update and delete from sharded order databases into Redshift so finance and operations can query near-real-time order state and full history.

Amazon
System Design
Data Engineer
Amazon
November 29, 2026
Data Engineer
System Design Round
System Design
Hard

0

0

0 solved


Design a pipeline that streams every insert, update and delete from sharded order databases into Redshift so finance and operations can query near-real-time order state and full history.

Amazon's order systems are sharded and heavily written, and finance depends on correct numbers, so CDC design comes up in senior data engineering loops. The interviewer focuses on ordering, exactly-once application of changes, schema changes, and backfills while traffic continues.

What the Interviewer Expects
  • Read changes from database logs rather than polling tables
  • Preserve per-key ordering across shards
  • Apply changes idempotently as upserts and deletes in the warehouse
  • Combine an initial snapshot with the ongoing stream without gaps
  • Handle schema evolution and monitor lag and correctness
Key Topics to Cover
Change Data Capture
Ordering
Idempotent Upserts
Snapshots
Data Warehousing
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How would you reconcile counts between source and warehouse every day?
  • How do you handle a source table that is resharded while CDC is running?
  • How would you support time-travel queries for the state of an order as of last Tuesday?
  • What if a column containing PII must be masked before landing?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Functional: capture row changes from about 100 database shards (Aurora MySQL or Postgres) for orders, order_items and payments; maintain a current-state table and an append-only history table in Redsh...

High-Level Design

Debezium-style connectors (or AWS DMS) tail each shard's binlog or WAL and publish change events to Kafka topics, keyed by primary key so all changes to an order land in one partition in commit order....


Submit Your Answer
Markdown supported