I am confused about the difference between CA and CP. Suppose that we choose CP,and there is a partition in the network, if we want to keep consistency in the distributed system, every node has to wait and get synchronized to prevent there is inconsistency. For example, we have 10 computers in the network and if two lose connection with others, every computer should wait. This makes a loss to availability. But it seems that the partition tolerance is not satisfied as well, because the whole system has to wait rather than do operations. So how does the CP work here?
-
possible duplicate of [NoSQL CAP theorem - Availability and Partition Tolerance](http://stackoverflow.com/questions/12346326/nosql-cap-theorem-availability-and-partition-tolerance) – Ankur Choudhary May 24 '15 at 08:59
1 Answers
For example, we have 10 computers in the network and if two lose connection with others, every computer should wait.
Yeah thats right.
But it seems that the partition tolerance is not satisfied as well, because the whole system has to wait rather than do operations.
Partition tolerance does not say that your partitions are availabil for all operations all the time. (You often choose Partitions in a PA Setting to make sure ther is always a server availabil but in CP its different.) Partition tolerance does not include the availability of thes partitions. CP Works like: I have Partitions and they are consistent to each other all the time but it can happen that the whole system does not anweser in time for write operations becaus one server died.
Edit: Forme Here. Tipped PA instat of CA.
CA: I have a System that must always be consistent and avialibale but i dont partition it. Becaus if i want consistency i cant paratition it AND make it avialibale all the time. PA: I have Partitions and mostly it will never happen that all Servers die (so the System is availabil all the time.) but my servers can be inconsistend to each other.

- 104
- 3
-
Thank you. But in CP, if the whole system is not available, can we say the system collapses at this time? And in CA, why do my servers can be inconsistent with each other? – Wubin Ouyang Mar 16 '15 at 09:39
-
Sry got mixed up the shortenings. Tipped CA when i meant PA. A CA System doesnt need to handle partions well. Relational DBMS are typical candiates for CA System. – Philip H. Mar 16 '15 at 09:53
-
1So what does the CP mean? I think P means that the system can continue to function even there is a partition. But if the system is not available, can we say the system does not function any more? – Wubin Ouyang Mar 16 '15 at 09:57
-
Well i think i said it a bit wrong: The System answers to read operations but write operations can take very long (until all partitions are consistent) to give an anwser. So CP means: My write operations can take very long becaus first we have to make sure ALL Patitions are consistent. – Philip H. Mar 16 '15 at 10:05