Code RoomSearch index sync from Postgres
HardPrep Room Coding #3398

Search index sync from Postgres

System designDatabases & SQLSenior–Staff~50 min

Design a change-data-capture pipeline that keeps a search index (Elasticsearch) and a read-cache continuously in sync with a primary Postgres database for an e-commerce catalog of 50M products updated thousands of times/sec (price changes, inventory, edits). The search results can be slightly stale but must never be permanently wrong, must reflect deletes, and must survive consumer crashes and re-indexes. How do you capture changes from Postgres and propagate them reliably without dual-writes from the app?

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.