Paxos Protocol Learning---3.Paxos Made Simple

Source: Internet
Author: User
Tags prepare require

First read Parliament and then read simple really, much better.

Here are the Reading notes

Paxos Made Simple
P2
1. Why not use a acceptor?
A: Because that node may fail.


2. Why the arbitrary QRM can determine a value by passing a value.
Answer: Because any qrm has at least one of the same people,
If we can make sure that a acceptor can only accept the most
A value that ensures that any QRM confirmed value is the same value.


3. Why to satisfy the condition P1.
A: We want to be selected even if only one value is proposed, since we have no failure or loss of information.
What it means is that we should make sure that there are proposals that can be passed.


4. Why a acceptor must be allowed to accept more than
One of the proposals.
A: Because of the possibility of node failure, a proposal may not
If you find a QRM, you cannot determine a value. This would require several proposals. A acceptor can be accepted in a different proposal.
Different merits of the proposal.
This encounter 2n+1, there are n selected X, there are n selected Y, and a collapse of the case, someone changed their mind to choose a value.


P3
1. Why the conditions are P2.
A: The P2 condition directly satisfies as long as there is a value selected.
Then it certainly satisfies the consistency.


2. Why the conditions are P2A.
A: Because P2 is saying that V is selected after all than V
The number of the large and selected proposed values should all be v.
And P2A is saying that V was chosen after all the proposals in the number larger than V
In a poll, accept can only offer a V-value.
Obviously P2A can meet P2.


3. Why the conditions are p2b.
Now the proposed value of V has been passed.
There will always be acceptor who have not received any proposals before.
At the same time, there will be no known situation of the proposer, put forward
A higher-numbered value is not a proposal for V.
Due to the presence of P1, the acceptor will accept a number greater than V,
But the value is not a V proposal.
This is contradictory to the requirements of P2A.
In order to resolve this contradiction, I can't let you make such a proposal.
This is p2b.


P4
1. Why should P2C be proposed?
Answer: This p2c is the part-time parliament.
a 3rd condition. And P2B is the Lemma 1 which is presented inside.
This condition doesn't matter if it's passed.
are limited, the proposal now to be made must be
The maxvote in your qrm are the same.
The P2B can be satisfied by contradiction proof satisfying the p2c.
This proves that satisfying the p2c satisfies the P2.


2. Why proposer asked Acceptor to say to promise
Do not accept the proposal that the number is smaller than N.
A: Because in order to comply with P2C's rules, proposer in the new proposal
Before you ask Qrm's maxvote.
To ensure that this maxvote is up-to-date and effective, it must be required
A proposal with a number less than n can no longer be accepted.
Because once the offer is accepted with a number less than N.
Then Maxvote may have changed, and the proposed proposer maxvote information passed to the number n was invalidated.


P5
1.acceptor whether to accept or not to accept the request.
A: Acceptor does not accept request at any time will not affect
Consistency. So there is no requirement for acceptor to be accepted.
For response requests
①prepare request to respond on the response
②acceptr request can only be answered if there is no commitment to respond.


2.acceptor ignores the prepare of proposals it has accepted
Request, why would an already accepted proposal have prepare
Request it.
A: Because the asynchronous network has dropped packets and duplicate packets exist.


3. A acceptor need to persist two things.
① the biggest offer it's ever had to accept.
② the biggest offer it's ever promise.
Why.
Answer: ① is to answer Maxvote
② is to reject some prepare request
This two-something persistence ensures a smooth 2Pc.


P6
1.acceptor Actual acceptance behavior
A: In order to ensure the fast operation of the protocol, the actual behavior is as follows
① for prepare request, have encountered than their own promise
A proposal with a larger number is respond promise
② for accept request, as long as not encountered promise inside
If the promise is unacceptable, accept it.




Excerpts from the original text:
P1. An acceptor must accept the first proposal the IT receives.


P2. If a proposal with the value V is chosen, then every higher-numbered proposal the is chosen have value v.


P2a.if a proposal with value V are chosen, then every higher-numbered proposal accepted by any acceptor have value v.


P2b.if a proposal with value V are chosen, then every higher-numbered proposal issued by any proposer have value v.


P2c.for any V and N, if a proposal with value V and number N are Issued,then there is a set S consisting of a majority of Acceptors such that
Either (a) no acceptor in S have accepted any proposal numbered LessThan N, or (b) v is the value of the highest-numbered Proposal among
All proposals numbered less than n accepted by the acceptors in S.


P1a.an Acceptor can accept a proposal numbered n iff it has no responded to a prepare request have a number greater tha n N.


Question
1. If a total of 10 persons were notified of 8 persons,
But with 7 people agreeing, it doesn't count.
A: count, as long as there is any QRM full support, even if the proposal passed.


2. If there is a 2n+1 acceptor.
There are two proposals at the same time, at this time N pro-Proposal 1,
N in favour of proposal 2, the first 2n+1 acceptor collapsed.
As if the agreement is to say, only accept the same as oneself.
So as long as the first 2n+1 does not appear, not always choose not to come out.
A: There is a problem with the previous understanding. It is acceptor to accept the proposal that is not the same as the one you accepted before.
But for the proponents, the proposed proposal is a requirement.


3. How does a proposer know to get a QRM
Response to the acceptor.
is because when the system is set, it is given a cluster of
The number of all acceptor.
So how do you maintain this quantity? The feeling can only be given manually.


4. How to guarantee that multiple proposer will not present the same
Number of proposals.
A: Each proposer can use the number set is not to hand.
So different proposer are not available with the same number.
And for a certain proposer as long as the guarantee is not the same as their previous number.


5. This proposer and learner have to choose Leader,
So how does this leader election process guarantee consistency?
If you consider the choice of leader as a proposition, before you actually choose
There will be more than one proposer to propose, which may lead to constant
Prepare request conflict, unable to do how to choose.
The original P7 has such a statement,
A reliable algorithm for electing a proposer must use
Either randomness or real time-for example, by using timeouts.
But elected, how to ensure consistency, how to let all machines know it.
A: Leader does not require maintaining strict consistency, while there are more than one leader is
Allowed. So just look through the heartbeat or lease to see Leader's survival.


Summary
The 1.P1 guarantees that a value can be selected.
The 2.P2 guarantees that the selected values are consistent.
3.P2A ensured the establishment of the P2.
4.P2B Guarantee, P1 and P2A at the same time set up, also guaranteed P1 and P2
also established.
5.P2C ensured the establishment of the P2B.

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.