Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Introduction to the principle of distributed system CAP

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

In the CAP principle, there are three elements:

Consistency (Consistency)

Availability (Availability)

Partition fault tolerance (Partition tolerance)

Consistency consistency

Consistency refers to "all nodes see the same data at the same time", that is, after the update operation is successful and the return client completes, all nodes have the same data at the same time. Distributed consistency

Consistency can be divided into two different perspectives: client-side and server-side. From the point of view of the client, consistency mainly refers to the problem of how to obtain the updated data during multiple concurrent access. From the point of view of the server, it is how updates are replicated and distributed to the entire system.

To ensure that the data are ultimately consistent. Consistency is due to the problem of concurrent reading and writing, so when understanding the problem of consistency, we must pay attention to considering the scenario of concurrent reading and writing.

From the client point of view, when multi-process concurrent access, the updated data in different processes how to obtain different policies, determine the different consistency. For relational databases, it is required that the updated data can be seen by subsequent visits, which is highly consistent.

If you can tolerate some or all of the subsequent access, it is weak consistency. If access to the updated data is required after a period of time, it is the ultimate consistency.

Availability availability

Availability means "Reads and writes always succeed", that is, the service is always available and is the normal response time.

For an available distributed system, every non-failure node must respond to every request. That is, any algorithm used by the system must eventually be terminated. When partition tolerance is also required, this is a strong definition: even serious network errors

Each request must be terminated.

Good usability mainly means that the system can serve users well without bad user experience such as user operation failure or access timeout. Availability is usually closely related to distributed data redundancy, load balancing and so on.

Fault tolerance of Partition Tolerance partitions

Partition fault tolerance refers to "the system continues to operate despite arbitrary message loss or failure of part of the system", that is, when a distributed system encounters a node or network partition failure, it can still provide external consistency.

And availability of services.

Partition fault tolerance is closely related to scalability. In distributed applications, the system may not work properly because of some distributed reasons. Good partition fault tolerance requires that although the application is a distributed system, it looks as if it is a functioning whole. such as

One or more machines in the current distributed system have crashed, and the rest of the machines can still operate normally to meet the system requirements, or there are network anomalies between the machines, which separate the distributed system from several independent parts. each part can also maintain the operation of the distributed system, so that

It has good partition fault tolerance.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report