Paxos Flashcards
(11 cards)
What is the Paxos algorithm?
A consensus algorithm for distributed systems.
What roles can nodes have in paxos?
- Proposer
- Acceptors
- Learners
What is a proposer node?
A node that suggests values to be chosen, or an update to be made.
What is an acceptor node?
A node that decides which value will be chosen. Once a majority of acceptors agree on a value that value is considered chosen.
What is a learner node?
Learners are informed about which value has been chosen. They don’t participate in the decision-making process but need to know the outcome.
How does proposal work?
Each value is proposed with a unique proposal number, ensuring that proposals are ordered and older ones can be superseded by newer ones.
How does a system achieve consensus?
The system achieves consensus when a majority of acceptors agree on the same value.
What is a Quoram?
A Quorum is a majority of acceptors and is required to proceed with both proposing and accepting value.
How many phases does Paxos have?
Two Phases
What take place in phase 1?
A proposer created a prepare message with unique ID, the acceptors promise to ignore any earlier proposals.
What takes place in Phase 2?
If a proposer has received a majority of promises, it will send an accept message with the ID and value. Learners will then learn the decided value after receiving accepted messages from a majority of acceptors.