CAP Theorem
Problem
Two database nodes lose communication with each other.
Both continue receiving requests.
Now you face a fundamental choice:
Should both continue answering even though they may disagree?
or:
Should some requests fail until communication returns?
Solution — CAP Constraint
CAP stands for:
Consistency: reads reflect the latest completed write.
Availability: working nodes keep answering requests successfully.
Partition tolerance: the system handles lost communication between nodes.
During a network split, guaranteeing availability means accepting potentially different answers.
Eventual consistency is one way to handle that tradeoff: nodes keep serving requests, then synchronize and resolve conflicts when communication returns.
Core idea: network partitions force distributed systems to choose which guarantee matters more for affected operations.