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.

MediumTechnical
35 practiced

Discuss the trade-offs between throughput and consistency when designing a service that requires high write throughput. What metrics would you collect to quantify the trade-off, and what patterns let you move some operations to eventual consistency while preserving correctness on the critical paths?

HardTechnical
29 practiced

Compare and evaluate the practical approaches to achieving 'exactly-once' effect across systems that do not natively support distributed transactions. For each approach, describe its operational complexity, performance characteristics, and the kind of workload it best fits.

HardSystem Design
27 practiced

Design API semantics and a contract to allow clients to retry complex 'create-with-side-effects' operations safely (for example: create-order that triggers inventory reservation and payment). Define idempotency key structure, client responsibilities, server guarantees (at-most-once vs idempotent-create), visibility of side-effects to users, and error semantics.

HardSystem Design
39 practiced

Design an audit trail for sagas that proves, for any transaction ID, whether the saga completed successfully or was compensated. It must preserve operation ordering and causality, allow efficient queries by transaction ID, minimize storage overhead, and satisfy retention requirements for auditors.

HardTechnical
56 practiced

Explain why two-phase commit (2PC) can block indefinitely and why three-phase commit (3PC) is rarely used in practice despite being designed to fix that. What non-blocking alternatives exist for cross-shard transactions, and how do they compare on safety, liveness, performance, and operational complexity?

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.