Code Room
System designHardsd-g182
Subject CdcLevel Senior–Staff~50 minCommon in Distributed systems interviewsIndustries Technology

Question

Design change-data-capture replicating a 4 TB Postgres OLTP database (3k writes/sec, frequent schema changes from a fast-moving product team) into a warehouse and a search index, with end-to-end lag under ~30s. Constraints: the search index must reflect deletes promptly, the warehouse needs full history (every version of a row), and you cannot put meaningful extra load on the OLTP primary. Design the capture mechanism, how you do the initial load without blocking, and how you keep it correct across schema changes.

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts — data model, bottlenecks, consistency, failure modes — and name the trade-offs you are making.

Narrate your design
Loading whiteboard…
Run or narrate your approach, then ask the coach.