Code Room
System designHardsd-g007
Subject Change data captureLevel Senior–Staff~45 minCommon in Distributed systems interviewsIndustries Technology

Question

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.

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