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

When is eventual reconciliation (periodic jobs to reconcile and fix inconsistencies) acceptable versus requiring strong transactional boundaries? Provide decision criteria (RPO/RTO, regulatory constraints, user impact) and concrete examples where reconciliation is appropriate and where it is not.

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.

MediumTechnical
27 practiced

You are on-call: users report duplicate charges even though requests include idempotency keys. Provide a prioritized debugging checklist to find the root cause: logs/traces to inspect, DB constraints, idempotency key collisions or TTL expiry, races in key insertion, message replay sources, third-party gateway callbacks, and immediate remediation steps.

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
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.

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.