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

Compare last-writer-wins (LWW) conflict resolution against CRDTs for achieving eventual consistency. In what scenarios is LWW acceptable, and when do CRDTs become the better fit? What operational costs does adopting CRDTs add (metadata growth, merge cost)?

HardSystem Design
34 practiced

Describe a zero-downtime migration strategy to change a service's consistency model from strong to eventual. Include feature flags, dual-writes, read-path toggles, monitoring to verify correctness, and a rollback path if anomalies appear. Explain how you would validate data correctness throughout the migration.

MediumSystem Design
35 practiced

Design a scalable approach to support atomic increments for a counter that's sharded across many keys (for example, a global 'likes' count). Compare a few approaches (per-shard counters with periodic aggregation, CRDT counters, a central counter service, optimistic CAS-based increments) on accuracy, throughput, read latency, and reconciliation cost.

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.

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.

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.