Blockchain Technical Guide Notes-cap Principles

Source: Internet
Author: User
Defined

Distributed computing systems cannot simultaneously ensure consistency (consistency), availability (availability), and partition tolerance (Partition), which often requires a weakening of the assurance of a particular feature. Consistency (consistency): any operation should be atomic, the subsequent event can see the result of the previous event, note that this refers to strong consistency, availability (availability): In a limited time, any non-failure node can answer the request; Partition tolerance (Partition): The network may be partitioned, that is, communication between nodes is not guaranteed.

It is more intuitive to understand that when the network may be partitioned, the system cannot guarantee consistency and availability at the same time. Either the node receives the request and does not answer because it is not confirmed by the other person, or the node can only answer the result of the same fee.
Fortunately, most of the time the network is considered reliable, so the system can provide a consistent and reliable service, when the network is unreliable, the system either sacrifices the consistency (most of the time), or sacrifice the availability. Application Scenarios

Since the CAP cannot be met at the same time, the system must be designed to weaken the support for a particular feature. weakening consistency

Applications that are insensitive to result consistency can allow for a period of time after the new version is online to be successful, with no guarantee of consistency.
For example, the website static page content, the real-time weak query database and so on, CouchDB, Cassandra and so on for this design. Weakening Usability

Applications that are sensitive to results consistency, such as bank teller machines, will be rejected when the system fails. MongoDB, Redis and so on for this design.
Paxos, raft and other algorithms, mainly to deal with this situation. weakening zoning tolerance

In reality, the probability of network partition appearing is small, but it is more difficult to avoid. Some relational databases, zookeeper, are designed for this purpose.
In practice, the network enhances the reliability through the dual channel mechanism, achieves the high stability network communication.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.