InterviewStack.io LogoInterviewStack.io

CAP Theorem and Consistency Models Questions

Understand the CAP theorem and how Consistency, Availability, and Partition Tolerance interact in distributed systems. Know different consistency models including strong consistency such as linearizability, eventual consistency, causal consistency, and session consistency, and how to apply them to different use cases. Be familiar with consensus protocols and distributed coordination primitives such as Raft and Paxos, quorum reads and writes, two phase commit and when to use them. Understand trade offs between consistency and availability under network partitions, patterns for hybrid approaches where different data uses different guarantees, and the product and developer experience implications such as latency, stale reads, and API contract clarity.

EasyTechnical
0 practiced
Explain causal consistency and how it differs from both eventual and strong consistency. Give a concrete user example (such as collaborative editing or chat threads) showing how causal guarantees improve UX. Briefly describe mechanisms to track causality (vector clocks, dependency tracking, causal trees) and their practical limitations.
HardSystem Design
0 practiced
You need a distributed lock service used by microservices for short-lived coordination (leader promotion, maintenance tasks). Compare a consensus-based lock manager (Raft-backed) versus lease-based locks with expirations (e.g., Redis SETNX+expire). Discuss safety, liveness, clock skew, renewal behavior, and how each handles network partitions and process pauses (e.g., GC pauses).
EasyTechnical
0 practiced
Explain quorum reads and writes in replicated storage. Given replication factor N and quorums R and W, state the condition(s) that guarantee strong consistency (no lost writes, reads see latest write). Provide numeric examples (e.g., N=3 with (R=2,W=2) vs (R=1,W=3)) and explain the trade-offs in latency and availability.
EasyTechnical
0 practiced
Define eventual consistency. Explain precisely what guarantees it provides and what it does not guarantee (for example, ordering, latency to converge, or monotonicity). List three types of applications where eventual consistency is acceptable and one where it is not. Describe what client symptoms (stale reads, repeated updates) developers should expect.
MediumTechnical
0 practiced
Describe Raft and Paxos at a high level: what problem they solve (consensus), and the main differences an engineer should consider when choosing one for a new distributed component. Focus on understandability, leader election, log replication, dynamic membership, and safety versus liveness trade-offs.

Unlock Full Question Bank

Get access to hundreds of CAP Theorem and Consistency Models interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.