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
29 practiced

Design a multi-region user profile service that must support 100M users, 50k profile updates per second globally, and 1M reads per second. Requirements: users see their own updates immediately (read-your-writes) within a region, other users see updates eventually (within a bounded window), and 99th-percentile read latency stays low per region. Sketch the high-level architecture, replication strategy, and how you provide the read-your-writes guarantee without strong global coordination.

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.

EasyTechnical
35 practiced

Explain the saga pattern for distributed transactions. Describe both the choreography and orchestration approaches and, using a multi-service example (such as Order -> Payment -> Inventory), show the normal forward flow and a compensating flow when a later step fails.

MediumTechnical
27 practiced

Walk through the decision process for choosing between eventual consistency and strong consistency for a specific feature (for example, inventory counts at checkout in a global retail system). What factors drive the decision, and how would you communicate and validate that choice?

HardTechnical
32 practiced

Compare implementing a global transaction coordinator using distributed consensus (Raft/Paxos) versus relying on a centralized ACID database for coordinating cross-shard transactions. Analyze latency, throughput, operational complexity, availability, and developer ergonomics, and give recommendations for systems of different scale and reliability requirements.

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.