databasecapnosql

NoSQL database. In CAP theorem, what does CP mean?


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?


Solution

  • 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.