CAP Theorem & Consistency Models
Difficulty: Medium | Topic #13
What to Learn
CAP theorem tradeoffs (Consistency, Availability, Partition Tolerance), strong consistency vs eventual consistency, read-your-writes, monotonic reads, linearizability, when to choose AP vs CP systems.
Resources
Covered by Problems
| Problem | Difficulty | Link |
|---|---|---|
| Distributed Cache | Medium | → |
| Ticketing System (Ticketmaster) | Medium | → |
| Online Auction | Medium | → |
| Payment System | Hard | → |
| Real-time Doc Collaboration (Google Docs) | Hard | → |
Key Concepts to Master
- Why partition tolerance is mandatory in distributed systems
- CP vs AP design choices and examples (HBase vs Cassandra)
- Eventual consistency models (read-your-writes, monotonic reads, causal consistency)
- Linearizability vs serializability
- PACELC theorem as a more nuanced view