Design Change Data Capture From Sharded MySQL Into the Warehouse

Last updated: November 29, 2026

Quick Overview

Design a pipeline that streams every insert, update, and delete from thousands of MySQL shards into the data warehouse, so analysts get daily snapshots and near-real-time tables of product data.

Meta
System Design
Data Engineer
Meta
November 29, 2026
Data Engineer
Onsite
System Design
Medium

0

0

0 solved


Design a pipeline that streams every insert, update, and delete from thousands of MySQL shards into the data warehouse, so analysts get daily snapshots and near-real-time tables of product data.

Meta's product data lives in sharded MySQL while analytics runs on warehouse tables, and data engineering loops ask how to bridge them without hammering production databases. Interviewers look for binlog tailing, ordering, schema changes, and snapshot reconstruction.

What the Interviewer Expects
  • Tail binlogs instead of querying production tables
  • Preserve per-row ordering
  • Build snapshot tables by merging change logs
  • Handle schema changes and backfills
  • Verify completeness
Key Topics to Cover
Change data capture
Binlog
Ordering
Snapshot merge
Schema evolution
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 do you bootstrap a new table that already has 10 billion rows?
  • What if a shard fails over to a replica mid-stream?
  • How would you serve a 'state as of 3 pm yesterday' query?
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 all row changes; produce a daily partitioned snapshot per table and a changelog table; optional streaming tables with minute-level latency.

Non-functional: no extra load o...

High-Level Design
  • Binlog tailers run next to replicas (not primaries), reading row-based binlog events and recording GTID positions.
  • Events go to a stream (Kafka-like) partitioned by (table, primary key) ...

Submit Your Answer
Markdown supported