- Consistency
- Every read receives the most recent write or an error.
- Availability
- Every request receives a (non-error) response, without the guarantee that it contains the most recent write.
- Partition tolerance
- The system continues to operate despite an arbitrary number of messages being dropped (or delayed) by the network between nodes.
When a network partition failure happens, it must be decided whether to do one of the following:
- cancel the operation and thus decrease the availability but ensure consistency
- proceed with the operation and thus provide availability but risk inconsistency.

Thus, if there is a network partition, one has to choose between consistency or availability. Note that consistency as defined in the CAP theorem is quite different from the consistency guaranteed in ACID database transactions.[4]
Linearizability or strict consistency: Linear consistency to execute the operations are executed in an order. It provides the definitely updated data as earlier operations are expected to complete atomically inlinear order even though the operations might have done in parallel or concurrently.
Linearizability can be achieved by
1. Distributed locking
2. Two-phase commit
3. Distributed data store with consensus algorithms like Paxos or Raft
PACELC theorem :
The PACELC theorem is an extension of the CAP theorem, providing additional insights into the behaviour of distributed systems during network partitions. The acronym PACELC stands for:
P (Partition tolerance)
A (Availability)
C (Consistency)
E (Else):
- The "Else" in PACELC suggests that in the absence of network partitions, the system should strive to achieve both consistency and availability. In other words, when the network is not partitioned, the system should aim to be both consistent and available.
L (Latency):
- PACELC includes an additional factor, "Latency," which highlights the importance of considering the performance characteristics of the system. It emphasises that the system's behaviour during normal operation (without partitions) should also take into account the latency of operations.
C (Complexity):
- Some versions of the theorem include an additional "C" for "Complexity," which suggests that the decision-making process during network partitions can introduce additional complexity to the system.
Comments
Post a Comment