InterviewStack.io LogoInterviewStack.io

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

You need a repair system capable of rewinding and reapplying events across replicas to fix a logical bug introduced in the event-processing code. Design the mechanism to snapshot state, replay events in a safe order, ensure idempotence during reapply, and minimize user-visible disruption. Provide rollback and verification steps.

MediumSystem Design
38 practiced

Architect a transactional outbox pattern for reliably publishing domain events when committing a write to the primary database. Include the outbox table schema, the reader design (and how you'd compare a polling reader against a change-data-capture-based reader), ordering guarantees, idempotency handling on the consumer side, and how you would scale the reader for high throughput.

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

Compare orchestration versus choreography when implementing sagas across microservices. Produce a decision matrix covering coupling, observability, error handling, and versioning, and give criteria for when you would recommend each approach.

HardTechnical
31 practiced

Design a conflict detection and resolution strategy for a piece of user data that may be updated concurrently at multiple regions (for example, user preferences, or a shopping cart with offline mobile edits). What options would you weigh, and how would you present a merge conflict to the user when automatic resolution isn't confidently correct?

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.