introduction : what is consensus ?

21
PAXOS: Consensus in a Distributed System Philipp Fath Supervisor: Dr. Diego Milano Leslie Lamport *1941

Upload: wynter-graves

Post on 30-Dec-2015

19 views

Category:

Documents


0 download

DESCRIPTION

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 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Introduction :  What is consensus ?

PAXOS:

Consensus in aDistributed System

Philipp Fath

Supervisor: Dr. Diego MilanoLeslie Lamport *1941

Page 2: Introduction :  What is consensus ?

Introduction: Consensus at PAXOS Island

non-Byzantine faults

Roles and Behaviors

Example situations

Outlook

Sources

Agenda

| Slide 2Workshop DIS: PAXOS / Consensus in a Distributed System Philipp Fath 2010/10/25

Page 3: Introduction :  What is consensus ?

Agenda

| Slide 3Workshop DIS: PAXOS / Consensus in a Distributed System Philipp Fath 2010/10/25

Introduction: Consensus at PAXOS Island

non-Byzantine faults

Roles and Behaviors

Example situations

Outlook

Sources

Page 4: Introduction :  What is consensus ?

| Slide 4Workshop DIS: PAXOS / Consensus in a Distributed System Philipp Fath 2010/10/25

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

Page 5: Introduction :  What is consensus ?

| Slide 5Workshop DIS: PAXOS / Consensus in a Distributed System Philipp Fath 2010/10/25

Introduction: PAXOS IslandAncient 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 possibleHowever: Legislators and Messengers are deeply honest

Requirements: Consistent, not contradicting ledgers

*) Note: The ancient parliament never really existet at Paxos, Leslie Lamport invented it totallyto popularize his consensus-algorithm named PAXOS.

Page 6: Introduction :  What is consensus ?

Agenda

| Slide 6Workshop DIS: PAXOS / Consensus in a Distributed System Philipp Fath 2010/10/25

Introduction: Consensus at PAXOS Island

non-Byzantine faults

Roles and Behaviors

Example situations

Outlook

Sources

Page 7: Introduction :  What is consensus ?

| Slide 7Workshop DIS: PAXOS / Consensus in a Distributed System Philipp Fath 2010/10/25

non-Byzantine faults

Agents• operate at arbitrary speed• may fail by stopping• may restart

Messages• arbitrary deliver time• can be duplicated• can be lost

Fail-stop or Crasha process works correct until a certain moment then it crashes

Omission or partial discontinuationSome messages might be lost but all of them are correct

TimingExecution of actions and sending of messages may be early or late

Not assumed in PAXOS: Byzantine errors and inconsistencyIncorrect working processes sending corrupted messages

Page 8: Introduction :  What is consensus ?

Agenda

| Slide 8Workshop DIS: PAXOS / Consensus in a Distributed System Philipp Fath 2010/10/25

Introduction: Consensus at PAXOS Island

non-Byzantine faults

Roles and Behaviors

Example situations

Outlook

Sources

Page 9: Introduction :  What is consensus ?

| Slide 9Workshop DIS: PAXOS / Consensus in a Distributed System Philipp Fath 2010/10/25

Consensus-making model: Roles

proposer learneracceptor

acceptorsproposers learners

Proposes a value vand assigns a unique

proposal number N to it

Accepts the proposal if ithas not promised to accept a

Proposal with higher number N

Learns chosenProposal N with value v

Quorum must accept proposal to be chosen

Page 10: Introduction :  What is consensus ?

| Slide 10Workshop DIS: PAXOS / Consensus in a Distributed System Philipp Fath 2010/10/25

Consens-making model: RolesCLIENT

leader

leader

proposers acceptors learners

fault-tolerant memory

Page 11: Introduction :  What is consensus ?

| Slide 11Workshop DIS: PAXOS / Consensus in a Distributed System Philipp Fath 2010/10/25

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

Page 12: Introduction :  What is consensus ?

Agenda

| Slide 12Workshop DIS: PAXOS / Consensus in a Distributed System Philipp Fath 2010/10/25

Introduction: Consensus at PAXOS Island

non-Byzantine faults

Roles and Behaviors

Example situations

Outlook

Sources

Page 13: Introduction :  What is consensus ?

| Slide 13Workshop DIS: PAXOS / Consensus in a Distributed System Philipp Fath 2010/10/25

Situation 1: Basic PAXOS [no faults]

Page 14: Introduction :  What is consensus ?

| Slide 14Workshop DIS: PAXOS / Consensus in a Distributed System Philipp Fath 2010/10/25

Situation 2: Failure of Acceptor

Page 15: Introduction :  What is consensus ?

| Slide 15Workshop DIS: PAXOS / Consensus in a Distributed System Philipp Fath 2010/10/25

Situation 3: Failure of redundand Learner

Page 16: Introduction :  What is consensus ?

| Slide 16Workshop DIS: PAXOS / Consensus in a Distributed System Philipp Fath 2010/10/25

Situation 4: Failure of Proposer

Page 17: Introduction :  What is consensus ?

| Slide 17Workshop DIS: PAXOS / Consensus in a Distributed System Philipp Fath 2010/10/25

Situation 5: Failure Duelling Proposers

Page 18: Introduction :  What is consensus ?

Agenda

| Slide 18Workshop DIS: PAXOS / Consensus in a Distributed System Philipp Fath 2010/10/25

Introduction: Consensus at PAXOS Island

non-Byzantine faults

Roles and Behaviors

Example situations

Outlook

Sources

Page 19: Introduction :  What is consensus ?

| Slide 19Workshop DIS: PAXOS / Consensus in a Distributed System Philipp Fath 2010/10/25

Outlook: PAXOS is a family of algorithms Multi-PAXOS

Several instances of PAXOS produce a continuous stream of agreedvalues but use the same leader.

Cheap-PAXOSAuxiliary Processors only take part during unstable periods.

Fast-PAXOSDirect Accept!-Message from client: saving one message delay

Generalized PAXOSAim is not to agree on a single value, but on an increasing set of values.

Page 20: Introduction :  What is consensus ?

Thank you !

Questions ?

Workshop DIS: PAXOS / Consensus in a Distributed System Philipp Fath 2010/10/25 | Slide 20

Page 21: Introduction :  What is consensus ?

| Slide 21Workshop DIS: PAXOS / Consensus in a Distributed System Philipp Fath 2010/10/25

Sources

http://www.merriam-webster.com/dictionary/consensus , 2010http://research.microsoft.com/en-us/um/people/lamport/pubs/pubs.html#lamport-paxos , 2010Highlights aus der Informatik, Ingo Wegener, Springer 1996The part-time parliament, Leslie Lamport, ACM Transactions on Computer Systems 1998Paxos Made Simple, Leslie Lamport, 2001Generalized Consensus and Paxos, Leslie Lamport, Microsoft Research 2004

Content

Imageshttp://www.nancy-universite.fr/fileadmin/public/dhc2007/Phototheque/images/4068.jpg , 2010https://belenus.unirioja.es/~mimarano/Lamport.jpg , 2010http://www.steckdosenversand.de/pics_site/netzwerk_ausschnitt_1.jpg , 2010http://en.wikipedia.org/wiki/Paxos_algorithm , 2010