A distributed system can only provide two of three guarantees simultaneously: Consistency, Availability, Partition tolerance.
Consistency
|
|
AP ----+---- CP
|
|
Availability
In practice, networks WILL partition -> Partition tolerance is non-negotiable.
You choose between C and A during the partition.
Two armies separated by fog. “Consistency” = both agree on the battle plan before acting. “Availability” = each army keeps fighting even if it can’t reach the other.
Interview tip: Name the picks real systems make. Cassandra = AP; ZooKeeper = CP.