Code RoomOrdered CDC replication over WAN
HardPrep Room Coding #3572

Ordered CDC replication over WAN

System designDatabases & SQLDistributed systemsSenior–Staff~50 min

Design a cross-region replication pipeline that ships an ordered change stream (CDC) from a primary region's transactional database to a secondary region used for read-scaling and DR, over an unreliable WAN that drops and reorders packets and occasionally has multi-minute outages. Requirements: the secondary must apply changes in an order consistent with the primary's commit order (no applying a child row before its parent / no out-of-order updates to the same key), must not lose or duplicate a change even across a connection reset, and replication lag must be observable so DR failover can make an informed RPO decision. Cover the log/offset model, ordering, exactly-once apply, and lag measurement.

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.

Clarify5:30 left
Estimate5:30 planned
Design16:30 planned
Deep dive13:30 planned
Failure9:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.