Code RoomChange-data-capture sync pipeline
HardPrep Room Coding #3132

Change-data-capture sync pipeline

System designDistributed systemsSenior–Staff~45 min

Design a change-data-capture pipeline that keeps a denormalized search index (Elasticsearch) and a cache continuously in sync with a sharded primary Postgres holding product/listing data, with ~30k row mutations/sec. Requirements: downstream views must never permanently diverge from the DB, updates should land within a few seconds, and a transaction that updates a listing row plus an inventory row must not be observed half-applied. Walk through how you capture changes, preserve order, and bootstrap a new consumer.

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:00 left
Estimate5:00 planned
Design15:00 planned
Deep dive12:00 planned
Failure8:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.