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.

HardSystem Design
0 practiced
You are designing a messaging system for chat where ordering and user experience matter. Compare three approaches: (A) global linearizable ordering for all messages, (B) causal ordering, and (C) eventual ordering. For each approach, describe required primitives, latency implications, complexity, and how you'd mitigate bad UX in partitions.
HardSystem Design
0 practiced
Design a reconciliation (anti-entropy) service that periodically scans replicas to detect divergence and repair an eventually consistent system. Specify data structures to detect divergence (hash trees, vector summaries), scheduling policies under bandwidth constraints, conflict resolution policies, and metrics to measure convergence speed and correctness.
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).
MediumTechnical
0 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.
EasyTechnical
0 practiced
Contrast linearizability and sequential consistency. Provide clear formal definitions for both, then describe a practical scenario (for example: a distributed counter or bank-account withdrawals) where linearizability is required, and another where sequential consistency would suffice. Explain implementation and performance implications of achieving linearizability.

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.