Data Consistency and Distributed Transactions Questions

Maintaining correctness of state across services and replicas: eventual consistency, conflict resolution (last-write-wins, CRDTs, vector clocks), the saga pattern, two-phase commit, and idempotency keys for exactly-once effects. Covers when to trade strict consistency for availability and how to reason about read-your-writes and monotonic guarantees. Focuses on the application/service layer rather than storage-engine internals.

HardSystem Design
32 practiced

Design a CRDT-based multi-master replication scheme for user-profile objects replicated across regions. Which CRDT types would you choose for the different kinds of profile fields (counters, strings/text, sets), how would you handle deletions and tombstones, and how would you surface an unresolved semantic conflict to the application when a CRDT merge alone can't decide the right outcome?

EasyTechnical
32 practiced

Explain how vector clocks detect concurrent updates in an eventually-consistent key-value store. Give a small example where two nodes concurrently update the same key and produce divergent versions, and contrast that with last-write-wins (LWW) conflict resolution: where is LWW acceptable, and where does it cause data loss?

EasyTechnical
47 practiced

Explain the transactional outbox pattern: what problem it solves, the usual flow (writing the business row and an outbox record in the same database transaction, then a relay reading the outbox and publishing), and how it helps achieve reliable, idempotent event delivery when the database and the messaging system are separate systems.

EasyTechnical
28 practiced

Explain the two-phase commit (2PC) protocol in detail: the coordinator and participant roles, the prepare and commit phases, and how durable logs are used to survive a crash. Enumerate the key failure modes (coordinator crash, participant crash, network partition) and describe the typical participant responses to each.

MediumTechnical
37 practiced

Compare last-writer-wins (LWW) conflict resolution against CRDTs for achieving eventual consistency. In what scenarios is LWW acceptable, and when do CRDTs become the better fit? What operational costs does adopting CRDTs add (metadata growth, merge cost)?

Unlock Full Question Bank

Get access to all 42 Data Consistency and Distributed Transactions interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.