What does CAP actually mean?
Practice this questionDefinition:
CAP describes a limit on distributed systems during a network partition. If nodes cannot communicate, the system cannot guarantee both a single up-to-date view of data and a successful response to every request to non-failing nodes. It must sometimes sacrifice availability or allow responses that may not satisfy that consistency guarantee.
Key points:
-
During a network partition, a system cannot guarantee both linearizable consistency and availability for every request.
-
It must sometimes reject/delay requests or allow responses that may not reflect the latest write.
-
It is not a general rule to “pick any two” for all normal operation.
-
Partition tolerance is not a switch that prevents network failure; the design must decide what happens when communication breaks.
Interview point:
- Use a two-node example and state what each side does when it cannot confirm the latest write.