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.

MediumSystem Design
38 practiced

Design a saga orchestration for a multi-service order workflow (for example: Orders, Payments, Inventory, Shipping). Specify the normal-step flow and the compensating actions for failures, how you ensure idempotency of each step, how the orchestrator persists saga state and recovers from crashes, and the retry/backoff strategy.

HardSystem Design
32 practiced

An application needs strongly consistent (linearizable) behavior for some operations and can tolerate eventual consistency for others within the same system. How would you design the APIs and data partitioning so clients can choose the right consistency level per operation, without causing data corruption or excessive complexity?

HardSystem Design
34 practiced

Design a collaborative real-time document editing service and choose a conflict-resolution strategy. Compare Operational Transformation (OT) and CRDT-based approaches on convergence guarantees, metadata growth, undo/redo complexity, latency of local edits, and support for offline editing at scale, and justify your choice.

MediumTechnical
38 practiced

Explain the differences between Lamport clocks, vector clocks, and logical timestamps in general. For each, state what it can and cannot detect (ordering versus true concurrency) and walk through a brief example of how it's updated on send and receive events.

MediumTechnical
30 practiced

You operate a nightly ETL job that sometimes produces duplicate rows because upstream producers retry, and you cannot change the producers. Design a deduplication strategy purely in the warehouse layer. Describe an efficient approach (SQL or merge-based), indexing/partitioning choices, and how you would run this as an incremental job with minimal cost.

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.