The CAP Theorem Explained
In any distributed data store, you can only guarantee two of the following three properties simultaneously:
- Consistency (C): Every read receives the most recent write or an error.
- Availability (A): Every request receives a (non-error) response, without the guarantee that it contains the most recent write.
- Partition Tolerance (P): The system continues to operate despite an arbitrary number of messages being dropped or delayed by the network between nodes.
Since network partitions (P) are a given in distributed systems, you must choose between Consistency (CP) and Availability (AP).