Distributed – theoretical basis (3) – what does P mean in cap theory?


What does P mean in cap theory?

In a distributed system, the network composed of nodes should be connected. However, some nodes may be disconnected due to some faults, and the whole network is divided into several areas. The data is scattered in these disconnected areas. This is called zoning.

When you save a data item in only one node, after the partition appears, the data will not be accessed by the part disconnected from the node. Partitions are intolerable.

The way to improve partition tolerance is to copy a data item to multiple nodes. After partition, this data item may be distributed to each zone. Tolerance increases.

However, if you want to copy data to multiple nodes, there will be a consistency problem, that is, the data on multiple nodes may be inconsistent. To ensure consistency, each write operation must wait for all nodes to write successfully, which will lead to availability problems.

Generally speaking, the more nodes the data exists, the higher the partition tolerance, but the more data to be copied and updated, the more difficult it is to ensure the consistency. In order to ensure consistency, the longer it takes to update all node data, and the availability will be reduced.

Author: Wu Jiang
Source: Zhihu
The copyright belongs to the author. For commercial reprint, please contact the author for authorization, and for non-commercial reprint, please indicate the source.