CAP theory is the theoretical guidance of current distributed storage system design, and PACELC theory is an extension of CAP theory. The theoretical basis of distributed storage system design is to expand from CAP theory to PACELC theory.

The definition of PACELC on the wiki is

"It states that in case of network parTITIoning (P) in a distributed computer system, one has to choosebetween availability (A) and consistency (C) (as per the CAP theorem), but else(E), even when the system is running Normally in the absence of parTITIons, onehas to choose between latency (L) and consistency (C)."

Simply put here means: "If there is a partition partition (P), the system must balance between availability and consistency (A and C); otherwise else (E) when the system is running without partition, the system needs Balancing between latency (L) and consistency (C)

The CAP theory holds that the following three cannot be met at the same time:

1) Consistency: All nodes have exactly the same data at the same time;

2) Availability: Node failure does not affect the system's IO;

3) Partition Tolerance: The system can support network partition (network connection failure), even if the message between the partitions is lost, the system works normally;

According to different business scenarios, different distributed storage systems will be weighed among the three CAPs according to their own business needs. The significance of CAP theory is the factor that needs to be weighed in the design of distributed storage systems, not the absolute three. Second, and there is no mention of Latency in CAP theory, while Latency is a very important indicator of availability.

Because CAP does not take into account the Latency factor in the system, a new model PACELC is defined, and Latency is added, as shown below:

How to transfer from CAP to PACELC in a distributed distributed system

The current theory of distributed storage system design guidance should replace the CAP theory with PACELC theory for the following reasons:

1) PACELC is better able to meet the working environment of distributed storage in actual operation is a better engineering implementation strategy;

2) In the scenario where partition (P) exists, a trade-off between availability and consistency (A and C) is needed. In fact, partition (P) does not exist for most of the time in a distributed system. A trade-off between latency (L) and consistency (C) is required;

3) Availability is associated with latency in the absence of partition (P) and with the reliable indicator in partition (P);

4) PACELC can achieve a balance between latency vs consistency;

5) The CAP theory ignores the trade-off between consistency and latency.

PACELC is built on top of CAP, both of which describe limitations and trade-offs between Consistency, Availability, and Partition Tolerance. PACELC further describes the trade-off between Latency and Consistency even in the absence of Partition, which provides a more complete theoretical basis for the Consistency model of distributed systems.

To ensure high availability of the system, then you must copy the data, and for data replication, there will be a trade-off between Consistency and Latency.

Take a PACELC application scenario chestnut, as shown below:

How to transfer from CAP to PACELC in a distributed distributed system

1. In a strong consistency replication scenario, all three copies need to be downloaded to return ok to the client. The master copies data to the slave. The limitation of Latancy is 20ms. Sometimes, the slave 2 hard disk or network fails. The master copies to the slave. The data has a delay of more than 20ms. At this time, if you wait for the slave 2 to return the result and then notify the client, performance and delay jitter will occur, and this jitter is a long tail effect that often occurs.

2, according to PACELC theory, we can make a trade-off between consistency and Latency, such as the delay of the slave2 node is more than 20ms, do not wait for the slave 2 to return, the master and slave 1 return the result to the client, if the slave 2 appears If the number of timeouts exceeds 5, then the node may be considered to be faulty, and a fault label is issued for subsequent processing.

Suspension Insulator

Suspension insulator,Post insulator,Metal end fittings,Power fittings

TAIZHOU HUADONG INSULATED MATERIAL CO.,LTD , https://www.thim-insulator.com