CAP theorem, PACELC, replication models, quorum, Raft and Paxos, sharding strategies and consistency models.
41 cards · basic cards · AI-written, checked twice. Edit anything.
- What does the CAP theorem state a distributed system can guarantee?
Show answer
At most two of three: consistency, availability, or partition tolerance
- In CAP, what does consistency mean?
Show answer
All nodes see the same data at the same time
- In CAP, what does availability mean?
Show answer
Every request receives a response, though it may not be the most recent data
- In CAP, what does partition tolerance mean?
Show answer
The system continues operating even when network partitions split nodes
- Why can a distributed system not have all three CAP properties?
Show answer
During a partition, nodes cannot communicate, so you must sacrifice either consistency or availability
- What does PACELC extend about the CAP theorem?
Show answer
It addresses both partition scenarios: if partition, choose PA; else, choose between latency and consistency
- What trade-off does PACELC introduce in non-partition scenarios?
Show answer
Latency vs consistency: lower latency requires accepting eventual consistency
- Name a distributed system that chooses availability during partitions.
Show answer
Amazon Dynamo or Cassandra, which use eventually consistent replication
- What is eventual consistency?
Show answer
All replicas converge to the same state eventually, but may be inconsistent temporarily
- What is strong consistency, also called linearizability?
Show answer
Reads always reflect all acknowledged writes, as if data resided on a single server
- What is causal consistency?
Show answer
Causally related writes are seen in the same order by all processes
- What is session consistency?
Show answer
Within a single client session, reads and writes are mutually consistent
- What is read-after-write consistency?
Show answer
After a write, the same client always reads the value it wrote
- What is monotonic read consistency?
Show answer
Once a client reads a value, subsequent reads return the same or a newer value
- What is monotonic write consistency?
Show answer
Writes from the same process are visible to all others in the order they were performed