C - Consistency means a client should get same view of data at a given point in time irrespective of node it is looked up from. All the servers in the system will have the same data so anyone using the system will get the same copy regardless of which server answers their request.
A - Availability here means that any given request should receive a response [success/failure]. The system will always respond to a request (even if it's not the latest data or consistent across the system or just a message saying the system isn't working).
P - Partition Tolerance means the system remains operational despite node or other hardware failures, the system is tolerant enough to these kind of failures. The system continues to operate as a whole even if individual servers fail or can't be reached.
In distributed systems, consistency, availability and partition tolerance exists in a mutually dependent relationship. You cannot have all 3, for example, if you choose strict consistency you have to give away availability, therefore pick any two.
Theoretically it is impossible to fulfill all three requirements. Therefore current NoSQL databases follow the different combinations of the C,A,P from the CAP theorem.
CA – Single site cluster, therefore all nodes are always in contact. When a partition occurs, the systems blocks.
CP – Some data may be not accessible, but the rest is still consistent/accurate.
AP – System is still available under partitioning, but some of the data returned may be inaccurate.
Comments