CAP Theorem
Wiki Index
A quick definition is: when a network partition occurs, either:
- Don’t accept requests (consistent but not available)
- Accept requests (available but not consistent)
More official definitions:
- Consistency: Any read operation that begins after a write operation completes must return that value, or the result of a later write operation.
- Availability: Every request received by a non-failing node in the system must result in a response.
- Network Partitions: the network will be allowed to lose arbitrarily many messages sent from one node to another.
A system cannot be simultaneously consistent, available, and partition tolerant at once. Since we don’t really have any real control over network partitions, in the worst case, a system can either be consistent (strongly consistent) or available (eventually consistent).