WeChat public account: Concurrent notes to pay attention to more consensus algorithm-related content. If you have any questions or suggestions, please leave a message on the official account;
To answer this question, first understand the following questions
What is the difference between consensus and consistency?
How to understand the majority?
Why only need a majority to support it, even if there is consensus?
How does Paxos handle read requests?
Correct ambiguities in the topic.
Paxos is a Consensus Algorithm. Many articles in China translate Consensus as “consistency”, there is no problem in Chinese understanding, and in spoken language, we often use “consensus” and “consistency” alternately. For example, “tourism to Yunnan has reached a consensus” and “tourism to Yunnan has reached an agreement”, these two sentences express the same meaning. But in a distributed environment of computers, the two words differ slightly.
Consistency means that the data between replicas remains 100% the same state, such as C in CAP, which means 100% consistency, and the trade-off between CAs means that the data of each member is consistent. The trade-off between C and A is a philosophical problem that regulates (0 to 100%) intensity. For details, please refer to:
The deepest thinking of CAP on the whole network
Consensus means that from the perspective of external observers (clients), the data inside the system is consistent, and no matter which copy is accessed, the same data can be obtained, while the real situation inside the system may not be 100% consistent. Therefore, it is more appropriate for the Paxos algorithm to be translated as “consensus algorithm”.
A consensus algorithm, in addition to ensuring the correctness of the algorithm, fault tolerance is also essential, Paxos is no exception. In order to achieve high fault tolerance, Paxos allows a small number of members to fail, and only needs the support of the majority of members when deciding whether a proposal is agreed upon.
The Paxos algorithm is divided into two phases, the Prepare phase and the Accept phase. The Prepare phase is used to gain ownership of the initiating negotiations in this round and to obtain proposals that may have been agreed upon in the previous round of consultations. So we can also think of the Prepare stage as the read stage, and the Accept stage as the write stage.
In order to ensure that a proposal that has reached consensus does not change, when a proposal with potential consensus is obtained at the reading stage, the writing stage can only use that proposal to initiate consultations. In the two independent stages, in order to exchange information, there must be a medium of communication, and the medium of communication originates from the “majority”. Because the “majority idea” can ensure that any two majority sets intersect, then this intersecting copy is the medium of communication, we only need to control the intersecting copies so the rules that support the proposal (of course, all copies may be intersecting copies), so that the reading stage can get to the previous round of writing stage may reach a consensus proposal, continue this possible consensus proposal, in this round can only put forward the proposal, then we can ensure that the consensus proposal will not change.
Paxos only needs majority support, so the data between each member is inconsistent, but there must be a majority that has consistent data.
So Paxos handles read requests and usually needs to run another round of Paxos to get a consensus on a proposal through the Prepare stage.
Of course, each read request runs a round of Paxos, which is very slow, so there is also an optimization scheme in the industry, such as adding a round of confirm requests to record the confirm log for the consensus proposal.
How does Leaner get a consensus proposal? There are usually two scenarios, the most commonly used is the second type, the first is not efficient, and the Learner requires some computing power.
After Acceptor receives an Accept request, after accepting the request, forwards the Accept request to all Learners, and Learner needs to determine whether a proposal has a majority support for the proposal.
After Proposer receives a majority Acceptor support Acceptor request, it knows that the proposal has reached consensus and sends the proposal to Learner.
17 thoughts on “Why does Paxos guarantee overall consistency?”
Thanks for discussing your ideas in this article. The other matter is that if a problem takes place with a personal computer motherboard, people today should not have some risk regarding repairing that themselves because if it is not done properly it can lead to irreparable damage to the entire laptop. It will always be safe to approach a dealer of that laptop with the repair of motherboard. They will have technicians who’ve an know-how in dealing with pc motherboard troubles and can have the right prognosis and undertake repairs.
you’re really a good webmaster. The web site loading speed is amazing. It seems that you are doing any unique trick. In addition, The contents are masterpiece. you have done a excellent job on this topic!
whoah this weblog is fantastic i really like reading your articles. Keep up the great paintings! You know, lots of individuals are searching round for this information, you could aid them greatly.
I love your blog.. very nice colors & theme. Did you create this website yourself or did you hire someone to do it for you? Plz reply as I’m looking to create my own blog and would like to find out where u got this from. appreciate it
Hey There. I found your blog using msn. This is a really well written article. I抣l make sure to bookmark it and come back to read more of your useful information. Thanks for the post. I will definitely comeback.
I like the valuable info you provide in your articles. I抣l bookmark your weblog and check again here regularly. I’m quite certain I抣l learn plenty of new stuff right here! Good luck for the next!
Thanks for the advice on credit repair on this excellent web-site. A few things i would advice people is always to give up the particular mentality that they buy at this point and fork out later. Being a society most people tend to try this for many factors. This includes vacation trips, furniture, and items we really want to have. However, you should separate your current wants from all the needs. As long as you’re working to boost your credit score actually you need some trade-offs. For example you can shop online to economize or you can check out second hand outlets instead of high priced department stores for clothing.
Howdy! Someone in my Myspace group shared this website with us so I came to take a look. I’m definitely loving the information. I’m book-marking and will be tweeting this to my followers! Excellent blog and great style and design.
Nice post. I was checking constantly this blog and I am impressed! Very helpful info specifically the last part 🙂 I care for such info a lot. I was seeking this particular information for a long time. Thank you and best of luck.
I believe that a foreclosed can have a major effect on the client’s life. Real estate foreclosures can have a 7 to decade negative influence on a debtor’s credit report. A new borrower that has applied for a home loan or any kind of loans for example, knows that your worse credit rating is definitely, the more tough it is to have a decent loan. In addition, it may affect the borrower’s capability to find a quality place to lease or rent, if that will become the alternative real estate solution. Interesting blog post.
I loved as much as you’ll receive carried out right here. The sketch is attractive, your authored subject matter stylish. nonetheless, you command get got an shakiness over that you wish be delivering the following. unwell unquestionably come further formerly again since exactly the same nearly very often inside case you shield this hike.
Thank you, I have recently been searching for information about this topic for a while and yours is the best I have found out till now. However, what in regards to the bottom line? Are you sure about the supply?
Thank you for another wonderful article. Where else could anybody get that type of information in such a perfect way of writing? I have a presentation next week, and I’m on the look for such information.
I have realized some essential things through your site post. One other stuff I would like to express is that there are plenty of games that you can buy which are designed specifically for preschool age children. They involve pattern acceptance, colors, dogs, and forms. These generally focus on familiarization in lieu of memorization. This keeps a child occupied without sensing like they are studying. Thanks
Thanks for this wonderful article. Yet another thing to mention is that most digital cameras are available equipped with the zoom lens so that more or less of a scene to get included by means of ‘zooming’ in and out. These kind of changes in the aim length are generally reflected while in the viewfinder and on massive display screen on the back of your camera.
I needed to write you one little bit of note to thank you once again relating to the spectacular methods you’ve shared in this case. This has been certainly particularly open-handed of you to give publicly all many people could possibly have offered for sale for an e book to help make some dough for themselves, primarily now that you might have tried it if you decided. These techniques likewise served as a easy way to fully grasp other people online have similar dream the same as my personal own to figure out good deal more when it comes to this matter. I’m certain there are some more fun periods ahead for people who start reading your website.
Hmm it appears like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I wrote and say, I’m thoroughly enjoying your blog. I too am an aspiring blog blogger but I’m still new to everything. Do you have any tips for inexperienced blog writers? I’d genuinely appreciate it.