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.

HardTechnical
58 practiced

You must migrate a monolith that uses a single ACID relational database into microservices without breaking correctness. Provide a step-by-step migration plan: how you would decide what each new service owns, how you would cut traffic over incrementally rather than all at once, how you would keep both the old and new systems correctly in sync during the transition, how operations that used to be one local transaction should behave once they span the boundary, how you would validate correctness before trusting the new path, and what your rollback plan looks like.

HardSystem Design
30 practiced

Architect a cross-service transactional system for moving money between accounts managed by separate services. Requirements: atomic transfer semantics (debit and credit both commit, or the system compensates), a durable audit trail, and the ability to reconcile and prove conservation of funds. You cannot use a single distributed database. Propose an architecture (saga, 2PC, or a hybrid), specify the protocol steps, failure handling, idempotency guarantees, and reconciliation process.

HardSystem Design
33 practiced

An enterprise needs eventual consistency between service A and service B using events. Design an idempotent event processing and reconciliation strategy that guarantees convergence and supports replays, while preserving ordering where necessary.

HardSystem Design
32 practiced

Design a saga coordinator that supports long-running transactions which include human approvals and manual compensations. Describe the state machine, durable state storage, visibility for operators, timeout and escalation policies, and how to ensure auditability and idempotent retries of compensating steps.

MediumTechnical
38 practiced

Explain monotonic reads and monotonic writes and how they differ. Describe how you would design automated tests that programmatically verify a distributed store meets monotonic reads and monotonic writes properties under injected failures (partitions, delays). Outline test harness components and example assertions.

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.