Transcript Slides
PAXOS:
Consensus in a
Distributed System
Philipp Fath
Leslie Lamport *1941
Supervisor: Dr. Diego Milano
Agenda
Introduction: Consensus at PAXOS Island
non-Byzantine faults
Roles and Behaviors
Example situations
Outlook
Sources
Workshop DIS: PAXOS / Consensus in a Distributed System
Philipp Fath 2010/10/25 | Slide 2
Agenda
Introduction: Consensus at PAXOS Island
non-Byzantine faults
Roles and Behaviors
Example situations
Outlook
Sources
Workshop DIS: PAXOS / Consensus in a Distributed System
Philipp Fath 2010/10/25 | Slide 3
Introduction: What is consensus?
Origin
Latin: consentire = feel together
Definition (Merriam-Webster Britannica)
general agreement: unanimity
the judgment arrived at by most of those concerned
group solidarity in sentiment and belief
In a Distributed System
Consistent agreement on a value
Different processes must not give contradictory answers
Workshop DIS: PAXOS / Consensus in a Distributed System
Philipp Fath 2010/10/25 | Slide 4
Introduction: PAXOS Island
Ancient parliament of the Greek Island of Paxos*
Parliament’s primary task:
determine the law (sequence of decrees passed)
Instead of having a secretary recording the law,
every legislator records passed decrees in his personal ledger
Problems:
> Legislator work on part-time
> Communication only by (part-time) messenger possible
However: Legislators and Messengers are deeply honest
Requirements: Consistent, not contradicting ledgers
*) Note: The ancient parliament never really existet at Paxos, Leslie Lamport invented it totally
to popularize his consensus-algorithm named PAXOS.
Workshop DIS: PAXOS / Consensus in a Distributed System
Philipp Fath 2010/10/25 | Slide 5
Agenda
Introduction: Consensus at PAXOS Island
non-Byzantine faults
Roles and Behaviors
Example situations
Outlook
Sources
Workshop DIS: PAXOS / Consensus in a Distributed System
Philipp Fath 2010/10/25 | Slide 6
non-Byzantine faults
Fail-stop or Crash
a process works correct until a certain moment then it crashes
Omission or partial discontinuation
Some messages might be lost but all of them are correct
Timing
Execution of actions and sending of messages may be early or late
Agents
• operate at arbitrary speed
• may fail by stopping
• may restart
Messages
• arbitrary deliver time
• can be duplicated
• can be lost
Not assumed in PAXOS: Byzantine errors and inconsistency
Incorrect working processes sending corrupted messages
Workshop DIS: PAXOS / Consensus in a Distributed System
Philipp Fath 2010/10/25 | Slide 7
Agenda
Introduction: Consensus at PAXOS Island
non-Byzantine faults
Roles and Behaviors
Example situations
Outlook
Sources
Workshop DIS: PAXOS / Consensus in a Distributed System
Philipp Fath 2010/10/25 | Slide 8
Consensus-making model: Roles
Proposes a value v
and assigns a unique
proposal number N to it
Accepts the proposal if it
has not promised to accept a
Proposal with higher number N
proposer
acceptor
Learns chosen
Proposal N
with value v
learner
Quorum must accept proposal to be chosen
proposers
Workshop DIS: PAXOS / Consensus in a Distributed System
acceptors
learners
Philipp Fath 2010/10/25 | Slide 9
Consens-making model: Roles
CLIENT
fault-tolerant memory
leader
leader
proposers
Workshop DIS: PAXOS / Consensus in a Distributed System
acceptors
learners
Philipp Fath 2010/10/25 | Slide 10
Roles and behaviors: Basic PAXOS
Phase 1a: Prepare
• a Proposer selects a proposal number N
• and sends a prepare-request with number N to a majority of acceptors
Phase 1b: Promise
• acceptors answer with a promise not to accept any more proposals
with a number less than N
• and answer with the highest-numbered proposal (if any) accepted
Phase 2a: Accept!
• if the proposer received a answer of a majority of acceptors,
it sends an accept-request N with value v to them
• v is the value of the highest-numbered proposal among the answers,
or may be any value if no values were reported
Phase 2b: Accepted
• acceptors accept proposal if they haven’t given a new promise in meantime
Workshop DIS: PAXOS / Consensus in a Distributed System
Philipp Fath 2010/10/25 | Slide 11
Agenda
Introduction: Consensus at PAXOS Island
non-Byzantine faults
Roles and Behaviors
Example situations
Outlook
Sources
Workshop DIS: PAXOS / Consensus in a Distributed System
Philipp Fath 2010/10/25 | Slide 12
Situation 1: Basic PAXOS [no faults]
Workshop DIS: PAXOS / Consensus in a Distributed System
Philipp Fath 2010/10/25 | Slide 13
Situation 2: Failure of Acceptor
Workshop DIS: PAXOS / Consensus in a Distributed System
Philipp Fath 2010/10/25 | Slide 14
Situation 3: Failure of redundand Learner
Workshop DIS: PAXOS / Consensus in a Distributed System
Philipp Fath 2010/10/25 | Slide 15
Situation 4: Failure of Proposer
Workshop DIS: PAXOS / Consensus in a Distributed System
Philipp Fath 2010/10/25 | Slide 16
Situation 5: Failure Duelling Proposers
Workshop DIS: PAXOS / Consensus in a Distributed System
Philipp Fath 2010/10/25 | Slide 17
Agenda
Introduction: Consensus at PAXOS Island
non-Byzantine faults
Roles and Behaviors
Example situations
Outlook
Sources
Workshop DIS: PAXOS / Consensus in a Distributed System
Philipp Fath 2010/10/25 | Slide 18
Outlook: PAXOS is a family of algorithms
Multi-PAXOS
Several instances of PAXOS produce a continuous stream of agreed
values but use the same leader.
Cheap-PAXOS
Auxiliary Processors only take part during unstable periods.
Fast-PAXOS
Direct Accept!-Message from client: saving one message delay
Generalized PAXOS
Aim is not to agree on a single value, but on an increasing set
of values.
Workshop DIS: PAXOS / Consensus in a Distributed System
Philipp Fath 2010/10/25 | Slide 19
Thank you !
Questions ?
Workshop DIS: PAXOS / Consensus in a Distributed System
Philipp Fath 2010/10/25 | Slide 20
Sources
Content
http://www.merriam-webster.com/dictionary/consensus , 2010
http://research.microsoft.com/en-us/um/people/lamport/pubs/pubs.html#lamport-paxos , 2010
Highlights aus der Informatik, Ingo Wegener, Springer 1996
The part-time parliament, Leslie Lamport, ACM Transactions on Computer Systems 1998
Paxos Made Simple, Leslie Lamport, 2001
Generalized Consensus and Paxos, Leslie Lamport, Microsoft Research 2004
Images
http://www.nancy-universite.fr/fileadmin/public/dhc2007/Phototheque/images/4068.jpg , 2010
https://belenus.unirioja.es/~mimarano/Lamport.jpg , 2010
http://www.steckdosenversand.de/pics_site/netzwerk_ausschnitt_1.jpg , 2010
http://en.wikipedia.org/wiki/Paxos_algorithm , 2010
Workshop DIS: PAXOS / Consensus in a Distributed System
Philipp Fath 2010/10/25 | Slide 21