Code Room
System designHardsd-g036
Subject ReplicationLevel Senior–Staff~45 minCommon in Databases & SQL · Distributed systems interviewsIndustries Technology, Software development

Question

Design a change-data-capture pipeline that replicates writes from a primary OLTP database to a search index, a cache, and a data warehouse — each downstream needing the database's changes in order and without loss. The DB does 50k writes/sec, downstreams have different speeds (the warehouse batches, the cache is real-time), and during a downstream outage the pipeline must not lose changes or apply them out of order. Describe how you capture changes, guarantee ordering/no-loss, deliver to heterogeneous consumers, and the central correctness trade-off.

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.