InterviewStack.io LogoInterviewStack.io

Data Consistency and Distributed Transactions Questions

In depth focus on data consistency models and practical approaches to maintaining correctness across distributed components. Covers strong consistency models including linearizability and serializability, causal consistency, eventual consistency, and the implications of each for replication, latency, and user experience. Discusses CAP theorem implications for consistency choices, idempotency, exactly once and at least once semantics, concurrency control and isolation levels, handling race conditions and conflict resolution, and concrete patterns for coordinating updates across services such as two phase commit, three phase commit, and the saga pattern with compensating transactions. Also includes operational challenges like retries, timeouts, ordering, clocks and monotonic timestamps, trade offs between throughput and consistency, and when eventual consistency is acceptable versus when strong consistency is required for correctness (for example financial systems versus social feeds).

MediumTechnical
32 practiced
Describe a practical design to implement idempotency keys for multi-step workflows that cross service boundaries and message queues (e.g., client HTTP -> API gateway -> Kafka -> worker -> DB). Explain where keys are generated, persisted, checked, expired, and how to handle retries and failure scenarios.
MediumSystem Design
31 practiced
Design a distributed transaction approach for a bank transfer within a region that touches two independent account services owned by different teams. Compare Two-Phase Commit (2PC) with a saga-based approach: outline implementation steps, operational complexity, failure modes, and make a recommendation as a Solutions Architect.
HardTechnical
34 practiced
Explain session guarantees (read-your-writes, monotonic reads, monotonic writes, write-follows-reads). Propose an implementation strategy for client SDKs to provide these guarantees in a multi-region replicated datastore, including how to persist metadata across devices and handle token expiry.
MediumTechnical
31 practiced
A client needs maximum throughput for analytics ingestion while requiring reasonably fresh user profile data for joins. Propose an architecture that balances throughput and consistency and describe how you would set client expectations and monitor freshness.
HardSystem Design
34 practiced
Design a collaborative real-time document editing service and choose a conflict-resolution strategy: Operational Transformation (OT) vs CRDT. Compare their consistency convergence, intention preservation, implementation complexity, metadata overhead, and support for offline editing at scale.

Unlock Full Question Bank

Get access to hundreds of Data Consistency and Distributed Transactions interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.