Paxos Consensus Algorithm
- 58Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
58 questions
- 1Paxos is_____.
Hint
Describe both what kind of algorithms Paxos includes and their purpose.
Answer
a family of distributed algorithms used to reach consensus
Explanation
Paxos names a family of distributed algorithms for reaching consensus; this presentation focuses on vanilla Paxos.
- 2Although Paxos has many variants, the algorithm discussed here is_____.
Hint
Which version of the algorithm is the presentation focused on?
Answer
vanilla Paxos
Explanation
Paxos has many variants, but the algorithm discussed here is vanilla Paxos.
- 3An algorithm is distributed when it runs in_____.
Hint
Think about the collection of machines on which a distributed algorithm runs.
Answer
a set of computers or nodes
Explanation
In this context, distributed means that the algorithm runs across multiple computers or nodes.
- 4Consensus is_____.
Hint
What must the participants ultimately do with respect to the result?
Answer
agreeing on one result
Explanation
Consensus means reaching agreement on one result, rather than merely making proposals.
- 5In Paxos, a proposal is considered to have reached consensus once_____agrees on it.
Hint
The required group is more than half of the relevant participants.
Answer
a majority
Explanation
In the Paxos world described here, a proposal is considered to have reached consensus once a majority agrees on it.
- 6A reached consensus can be_____.
Hint
Consensus information may take time to spread, but what is its eventual reach?
Answer
eventually known by everyone
Explanation
After consensus is reached, everyone can eventually learn that it was reached and what the agreement was.
- 7In Paxos, the involved parties want to agree on_____rather than on their proposal.
Hint
The goal is agreement on the outcome, rather than insisting on a participant's original choice.
Answer
any result
Explanation
Participants in Paxos aim to agree on a result, not necessarily on the particular value any one of them proposed.
- 8A faulty communication channel may mean that_____.
Hint
What can happen to a message when a communication channel fails?
Answer
messages can get lost
Explanation
Communication channels may be faulty, so a message sent between participants may not arrive.
- 9A single computer cannot be_____.
Hint
Why might a growing service need to move beyond one workstation?
Answer
an infinitely powerful and scalable single computer
Explanation
A single computer has a limit; continually upgrading resources cannot provide infinite power or scalability.
- 10In a leader-replicas schema, when a value is proposed,_____.
Hint
Describe the leader's role in ordering and distributing proposed writes.
Answer
the leader serializes the different proposals and sends them to all the replicas
Explanation
In a leader-replicas schema, clients direct proposals to the leader, which orders them and distributes them to the replicas.
- 11In a peer-to-peer schema,_____.
Hint
Unlike a leader-replicas design, this schema gives the nodes equal status.
Answer
all nodes are the same and behave the same
Explanation
In a peer-to-peer schema, nodes have equal roles rather than relying on one leader to coordinate proposals.
- 12When a leader becomes unavailable, nodes must reach consensus to_____or the system may stall.
Hint
What must nodes agree on when the current leader can no longer serve?
Answer
elect a new one
Explanation
If the leader becomes unavailable, the nodes in a leader-replicas system need consensus to choose a replacement; otherwise the system stalls.
- 13In a peer-to-peer system, continuous consensus helps guarantee consistency by ensuring that_____.
Hint
What must consensus guarantee about the sequence of operations across nodes?
Answer
operations are applied in the same order everywhere
Explanation
Peer-to-peer nodes continually reach consensus so that their operations remain consistent in ordering.
- 14The Paxos role that proposes values for consensus is called a_____.
Hint
Which Paxos role initiates a proposed value?
Answer
proposers
Explanation
Proposers put forward values for the system to reach consensus on.
- 15The Paxos role that contributes to reaching consensus by accepting proposals is called an_____.
Hint
Which role participates in the protocol's acceptance decisions?
Answer
acceptors
Explanation
Acceptors contribute to reaching consensus by responding to protocol messages and accepting proposals.
- 16The Paxos role that learns the agreed-upon value is called a_____.
Hint
Which role finds out the result after it has been agreed upon?
Answer
learners
Explanation
Learners learn the agreed-upon value and can later be queried about it.
- 17In practice, a Paxos node can take_____.
Hint
A server can propose, participate in acceptance, and learn the result.
Answer
multiple roles, even all of them
Explanation
In practice, one Paxos node can act as a proposer, acceptor, and learner rather than having a single role.
- 18Paxos nodes must know_____.
Hint
What must nodes know to identify the group size needed for a decision?
Answer
how many acceptors a majority is
Explanation
Paxos nodes need to know the acceptor count so they can determine what constitutes a majority.
- 19A key property used by Paxos is that_____.
Hint
What intersection property of majorities supports Paxos's guarantees?
Answer
two majorities will always overlap in at least one node
Explanation
The overlap between any two majorities ensures that a later majority encounters at least one acceptor from an earlier majority.
- 20Paxos nodes must be_____so that they do not forget what they accepted.
Hint
Nodes must not forget accepted information after a restart or other interruption.
Answer
persistent
Explanation
Vanilla Paxos requires nodes to retain what they have accepted, even when communication channels are faulty.
- 21A Paxos run aims at reaching_____.
Hint
How many agreements on values does one run aim to produce?
Answer
a single consensus
Explanation
One Paxos run aims to reach agreement on one value; changing that value requires a different run.
- 22If a value must mutate over time,_____must happen.
Hint
What must begin if a system needs to agree on a changed value?
Answer
a different Paxos run
Explanation
Once a value has been chosen in a run, that run does not move on to a different value; a new run is needed for a mutation.
- 23At the start of a Paxos run, a proposer sends a PREPARE ID message to_____.
Hint
The proposer needs to contact enough acceptors to obtain a majority response.
Answer
a majority or all of the acceptors
Explanation
A proposer begins the prepare phase by sending its PREPARE ID message to a majority or to all acceptors.
- 24Each Paxos proposal ID must be_____.
Hint
An ID used for one proposal cannot be used again.
Answer
unique
Explanation
Proposal IDs must never be reused, so each proposal can be distinguished from proposals with other IDs.
- 25After a timeout, a proposer retries with_____.
Hint
The retry ID must be greater than the one used in the timed-out attempt.
Answer
a new, higher ID
Explanation
After a timeout, the proposer retries using a higher ID so that its new attempt can supersede earlier proposals.
- 26When an acceptor receives PREPARE for an ID, it first checks whether it has_____.
Hint
The acceptor checks whether an earlier commitment prevents it from responding to this ID.
Answer
promised to ignore requests with that ID
Explanation
An acceptor ignores a PREPARE request if it has already made a promise that excludes requests with that ID.
- 27On responding to an eligible PREPARE, an acceptor promises to ignore_____.
Hint
The new promise protects against proposals numbered below the prepare ID.
Answer
any request lower than that ID
Explanation
If the acceptor has not already promised to ignore the requested ID, it promises to ignore requests with lower IDs.
- 28An acceptor that grants a prepare request replies with_____.
Hint
Recall the name of the response sent during the prepare phase.
Answer
PROMISE ID
Explanation
An acceptor responds to a prepare request with a PROMISE message carrying the proposal ID.
- 29After a majority of acceptors promises on a particular ID,_____.
Hint
Use the fact that any two majorities share at least one acceptor.
Answer
no ID lower than that ID can make it through
Explanation
Once a majority has promised on an ID, the overlap between majorities prevents a lower ID from obtaining the majority needed to proceed.
- 30Once a proposer has a majority of PROMISE messages for an ID, it sends an_____with that ID and a value.
Hint
This message asks acceptors to accept the proposed value in the next phase.
Answer
ACCEPT REQUEST
Explanation
After receiving a majority of PROMISE messages for an ID, the proposer sends an ACCEPT REQUEST carrying that ID and a value.
- 31When a proposer receives no previously accepted value in its promises, it may initially choose_____.
Hint
This freedom applies when no accepted value is reported back to the proposer.
Answer
any value it wants
Explanation
If the proposer has not received a previously accepted value in the promises, it may choose any value it wants to propose.
- 32If an acceptor can honor an ACCEPT REQUEST, it sends_____.
Hint
Name the response that records an eligible acceptance.
Answer
ACCEPT with that ID and that value
Explanation
An acceptor that has not promised to ignore the ACCEPT REQUEST sends an ACCEPT message containing its ID and value.
- 33When an acceptor accepts a proposal, it also sends the ACCEPT message to_____.
Hint
Besides the proposer, which participants receive ACCEPT messages?
Answer
all the learners
Explanation
Acceptors send their ACCEPT messages to the proposers and to all learners so learners can find out what was accepted.
- 34If a majority of acceptors accepts a particular ID and value,_____.
Hint
What is the result when enough acceptors accept a proposal?
Answer
consensus is reached
Explanation
A majority of acceptors accepting the same ID and value establishes consensus on that value.
- 35Paxos reaches consensus on_____rather than on the ID.
Hint
Distinguish the user-visible proposal from the protocol's internal identifier.
Answer
the value
Explanation
Consensus is on the proposed value; the ID is an internal Paxos artifact and is not the agreed result.
- 36A proposer or learner knows that consensus has been reached when it receives_____for a particular ID.
Hint
What set of acceptance messages lets a proposer or learner recognize the decision?
Answer
a majority of ACCEPT messages
Explanation
A proposer or learner knows consensus has been reached on a value when it receives ACCEPT messages from a majority for that proposal.
- 37The three milestones in a Paxos run always happen_____.
Hint
The milestones do not occur in arbitrary order; one follows another.
Answer
sequentially
Explanation
The three milestones in a Paxos run occur in order: a majority promises, a majority accepts, and a proposer or learner learns the result.
- 38The first Paxos milestone is that_____.
Hint
This is the first of the three milestones, before acceptances are counted.
Answer
a majority of acceptors promise on an ID
Explanation
The first milestone is a majority promising on an ID, which prevents lower IDs from making it through.
- 39The second Paxos milestone is that_____.
Hint
This milestone turns a proposed value into the consensus result.
Answer
a majority of acceptors accept an ID and value
Explanation
The second milestone establishes consensus on the value through a majority of acceptor responses.
- 40The third Paxos milestone is that_____.
Hint
This milestone concerns learning that the earlier majority acceptance occurred.
Answer
a proposer or learner gets a majority of ACCEPT messages
Explanation
The third milestone is when a proposer or learner receives enough ACCEPT messages to know consensus has been reached.
- 41If a proposer receives previously accepted values in its promises, it must select_____.
Hint
Compare the accepted IDs carried in the promises and preserve the value attached to the greatest one.
Answer
the value with the highest accepted ID that it got
Explanation
When promises report previously accepted values, a proposer must choose the value associated with the highest accepted ID among those reported.
- 42When a later prepare encounters an already accepted proposal, the new proposal uses a higher ID but must carry_____.
Hint
The proposal number can change while the chosen content remains unchanged.
Answer
the same value
Explanation
A later proposal may use a higher ID, but a previously accepted value reported in the promises must be preserved.
- 43Several competing proposals in the same Paxos run can cause_____.
Hint
What problem arises when proposals keep stepping over one another?
Answer
contention
Explanation
Several proposers issuing competing proposals in one Paxos run can repeatedly supersede one another and create contention.
- 44Several proposals on the same Paxos run can cause_____that yield contention.
Hint
The material uses this term for concentrated activity that contributes to contention.
Answer
hotspots
Explanation
Multiple proposals on the same run can create hotspots that yield contention and potentially stall progress.
- 45A potential solution to contention between proposers is to use_____.
Hint
Think of a retry strategy that increases waiting time after repeated conflicts.
Answer
exponential backoff
Explanation
A possible solution to proposal contention is exponential backoff, which gives one proposal time to complete before another retry competes.
- 46In the contention example, exponential backoff leaves_____.
Hint
What opportunity should the increased waiting time provide?
Answer
enough time for any of the proposals to go through entirely
Explanation
Waiting through exponential backoff can create a window for one proposal to finish the Paxos run before another proposal interferes.
- 47After a higher ID has received a majority of promises, a lower-ID accept request cannot be accepted by a majority because it would require_____.
Hint
Identify the prerequisite that the lower-numbered proposal cannot satisfy.
Answer
a majority of promises for the lower ID
Explanation
A lower-ID accept request cannot be accepted by a majority after a higher-ID majority has promised, because the lower request would first need a majority of promises.
- 48After a majority accepts a proposal, at least one acceptor in a later majority will piggyback_____in its promise.
Hint
The later proposer learns prior acceptance through information carried in a promise.
Answer
the accepted ID and value
Explanation
After a value has been accepted by a majority, a later prepare is guaranteed to encounter an acceptor that reports that accepted ID and value.
- 49After a majority accepts a value, later proposals with higher IDs can be accepted only with_____.
Hint
A higher ID is allowed, but the outcome must not change.
Answer
the same value
Explanation
Higher-ID proposals can still proceed after consensus, but the piggybacked accepted value forces them to preserve the value already chosen.
- 50Piggybacking an accepted value allows proposers and learners to_____even if they missed a majority of ACCEPT messages earlier.
Hint
What can a proposer find out from the value piggybacked on a later promise?
Answer
learn about Paxos consensus
Explanation
A proposer that missed earlier ACCEPT messages can discover the consensus by preparing again and receiving the accepted value in an acceptor's promise.
- 51To represent a changing bank account using Paxos, the system uses_____.
Hint
The solution is a sequence of agreed entries replicated across storage nodes.
Answer
a replicated log
Explanation
A bank account changes over time, so the storage system records changes as separate positions in a replicated log rather than trying to change one Paxos value.
- 52When a value needs to mutate, a new consensus begins on_____.
Hint
A new change is recorded after the previously agreed log entry.
Answer
the next log position
Explanation
Whenever the account value needs to change, the system starts a new consensus on the next position in the log.
- 53In the example, the bank account's initial state at its opening date is recorded at_____.
Hint
The initial account state is stored at the beginning of the sequence.
Answer
log position 0
Explanation
The first log position represents the initial state of the bank account at its opening date.
- 54After a transfer is recorded, a later withdrawal must be recorded at_____.
Hint
The withdrawal cannot overwrite the earlier transfer entry in the log.
Answer
a different log position
Explanation
A withdrawal is a new account change, so it must be recorded as a separate log entry and agreed upon in a separate consensus.
- 55When a client proposes a write, the storage server acts as_____.
Hint
Which Paxos role does the client's storage server take when initiating a write?
Answer
a Paxos Proposer
Explanation
The storage server that receives a client's proposed write acts as a proposer and sends the proposal to the acceptors.
- 56In the three-replica storage example, when the proposer and another acceptor accept the request,_____.
Hint
The threshold is satisfied when a majority of the three acceptors accepts.
Answer
consensus has been reached
Explanation
When the proposer and enough acceptors accept the request to form a majority, the write has reached consensus.
- 57If only two replicas write a value at first, the third replica will eventually_____.
Hint
The lagging replica does not have to write at exactly the same time as the others.
Answer
eventually figure out the value
Explanation
A replica that did not write the value initially can catch up later or learn it through a subsequent proposal for the relevant log position.
- 58When a lagging replica tries to propose again to catch up, it does so for_____.
Hint
The later proposal moves forward in the account's ordered sequence of entries.
Answer
the next log position
Explanation
A replica that catches up by proposing again uses the next log position and can learn the prior accepted value through the ACCEPT message.

Ask anything
We've read this whole study set, so questions about it get the best answers.