Paxos A Consensus Algorithm for Fault Tolerant Replication.

Slides:



Advertisements
Similar presentations
Paxos and Zookeeper Roy Campbell.
Advertisements

Paxos Made Simple Leslie Lamport. Introduction ► Lock is the easiest way to manage concurrency  Mutex and semaphore.  Read and write locks in 2PL for.
Replication techniques Primary-backup, RSM, Paxos Jinyang Li.
CS 542: Topics in Distributed Systems Diganta Goswami.
NETWORK ALGORITHMS Presenter- Kurchi Subhra Hazra.
CS 5204 – Operating Systems1 Paxos Student Presentation by Jeremy Trimble.
Paxos Lamport the archeologist and the “Part-time Parliament” of Paxos: – The Part-time Parliament, TOCS 1998 – Paxos Made Simple, ACM SIGACT News 2001.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Paxos Steve Ko Computer Sciences and Engineering University at Buffalo.
1 Indranil Gupta (Indy) Lecture 8 Paxos February 12, 2015 CS 525 Advanced Distributed Systems Spring 2015 All Slides © IG 1.
Dept. of Computer Science & Engineering, The Chinese University of Hong Kong Paxos: The Part-Time Parliament CHEN Xinyu
Consensus Hao Li.
Chubby Lock server for distributed applications 1Dennis Kafura – CS5204 – Operating Systems.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Paxos Steve Ko Computer Sciences and Engineering University at Buffalo.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Google Chubby Lock Service Steve Ko Computer Sciences and Engineering University at Buffalo.
State Machine Replication Project Presentation Ido Zachevsky Marat Radan Supervisor: Ittay Eyal Winter Semester 2010.
Paxos Made Simple Gene Pang. Paxos L. Lamport, The Part-Time Parliament, September 1989 Aegean island of Paxos A part-time parliament – Goal: determine.
CS 582 / CMPE 481 Distributed Systems
Fault-tolerance techniques RSM, Paxos Jinyang Li.
Eddie Bortnikov & Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Recitation.
Distributed Systems CS Case Study: Replication in Google Chubby Recitation 5, Oct 06, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud.
EEC 688/788 Secure and Dependable Computing Lecture 12 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
CHUBBY and PAXOS Sergio Bernales 1Dennis Kafura – CS5204 – Operating Systems.
Chapter 6 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University Building Dependable Distributed Systems.
CS 425 / ECE 428 Distributed Systems Fall 2014 Indranil Gupta (Indy) Lecture 19: Paxos All slides © IG.
CS 425 / ECE 428 Distributed Systems Fall 2014 Indranil Gupta (Indy) Lecture 18: Replication Control All slides © IG.
Eddie Bortnikov & Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Recitation.
State Machines CS 614 Thursday, Feb 21, 2002 Bill McCloskey.
Distributed Storage System Survey
Paxos Made Simple Jinghe Zhang. Introduction Lock is the easiest way to manage concurrency Mutex and semaphore. Read and write locks. In distributed system:
Bringing Paxos Consensus in Multi-agent Systems Andrei Mocanu Costin Bădică University of Craiova.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Paxos Steve Ko Computer Sciences and Engineering University at Buffalo.
Paxos: Agreement for Replicated State Machines Brad Karp UCL Computer Science CS GZ03 / M st, 23 rd October, 2008.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Google Chubby Lock Service Steve Ko Computer Sciences and Engineering University at Buffalo.
CSE 60641: Operating Systems Implementing Fault-Tolerant Services Using the State Machine Approach: a tutorial Fred B. Schneider, ACM Computing Surveys.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Google Chubby Lock Service Steve Ko Computer Sciences and Engineering University at Buffalo.
© Spinnaker Labs, Inc. Chubby. © Spinnaker Labs, Inc. What is it? A coarse-grained lock service –Other distributed systems can use this to synchronize.
Implementing Replicated Logs with Paxos John Ousterhout and Diego Ongaro Stanford University Note: this material borrows heavily from slides by Lorenzo.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Paxos Steve Ko Computer Sciences and Engineering University at Buffalo.
CS425 / CSE424 / ECE428 — Distributed Systems — Fall Nikita Borisov - UIUC1 Some material derived from slides by Leslie Lamport.
CS 425 / ECE 428 Distributed Systems Fall 2015 Indranil Gupta (Indy) Oct 1, 2015 Lecture 12: Mutual Exclusion All slides © IG.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Paxos Steve Ko Computer Sciences and Engineering University at Buffalo.
Detour: Distributed Systems Techniques
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Chapter 3 System Models.
The consensus problem in distributed systems
CS 525 Advanced Distributed Systems Spring 2013
Distributed Systems – Paxos
CSE 486/586 Distributed Systems Paxos
Lecture 17: Leader Election
Distributed Systems CS
EECS 498 Introduction to Distributed Systems Fall 2017
Implementing Consistency -- Paxos
CS 525 Advanced Distributed Systems Spring 2018
Fault-tolerance techniques RSM, Paxos
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
Lecture 21: Replication Control
EEC 688/788 Secure and Dependable Computing
EECS 498 Introduction to Distributed Systems Fall 2017
EEC 688/788 Secure and Dependable Computing
Replicated state machine and Paxos
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
Lecture 21: Replication Control
Implementing Consistency -- Paxos
CSE 486/586 Distributed Systems Paxos
Presentation transcript:

Paxos A Consensus Algorithm for Fault Tolerant Replication

Paxos CS 5204 – Fall, 2008 System Model Messages  possible indefinite delay  possible duplication or loss  delivered messages not corrupted... replicas client Replicas  identical  fail/stop/restart failures  stable storage available Goal: insure that all replicas remain identical despite replica failure and message loss.

Paxos CS 5204 – Fall, 2008 Safety requirements... replicas client Only a value that has been proposed (by a replica) may be chosen. Only a single value is chosen. A process never learns that a value has been chosen unless it actually has been.

Paxos CS 5204 – Fall, 2008 Multi-Paxos Within each instance (basic) Praxos is used to arrive at a consensus of the value to be used by all replicas The sequence of instances determines a sequence of values accepted by all replicas instance … vnvn v3v3 v1v1 v2v2 consensus values

Paxos CS 5204 – Fall, 2008 Roles Proposer(s): offer proposals of the form [value, number]. Acceptor(s): accept or reject offered proposals so as to reach consensus on the chosen proposal/value. Learner(s): become aware of the chosen proposal/value. Notes:  The proposal number is unique  A single distinguished proposer can be elected to guarantee progress  A single distinguished learner can be elected  In practice, all replicas play all roles  In practice, an elected “master” plays the roles of the distinguished proposer and the distinguished learner

Paxos CS 5204 – Fall, 2008 Majority consensus Each proposer makes a proposal to some majority of the acceptors. A majority of acceptors must accept a proposal for the proposed value to be chosen as the consensus value. If P 1 and P 2 are making different proposals, then there must be at least one acceptor that they share in common (and this common acceptor will decide which proposal prevails). A AA … AA … P1P1 P2P2 majority

Paxos CS 5204 – Fall, 2008 Choosing a value An acceptor will accept the proposal with the largest proposal number. A value is chosen once a majority of acceptors have accepted a proposal with that value. Once a proposal/value is chosen all proposals with a higher proposal number are “forced” to have the chosen value. [V 1, N 1 ] [V C, N C ] [V k, N k ] [V 2, N 2 ] [V C, N k+1 ] [V C, N k+2 ]

Paxos CS 5204 – Fall, 2008 Key idea The property: P2 b : If a proposal with value v is chosen, then every higher- numbered proposal issued by any proposer has value v. is guaranteed by maintaining the invariant: P2 c : For any v and n, if a proposal with value v and number n is issued, then there is a set S consisting of a majority of acceptors such that either (a) no acceptor in S has accepted any proposal numbered less than n, or (b) v is the value of the highest-number proposal among all proposals numbered less than n accepted by the acceptors in S.

Paxos CS 5204 – Fall, 2008 Paxos Protocol (a) Select proposal number n and send a prepare request with n to a majority of acceptors. (a) If majority response received, then send accept request for proposal [v,n] where v is the value of the highest-number proposal among the responses or any value it chooses. (b) If n greater than that of any prepare request to which it has already responded, then (1) respond with the highest- numbered proposal (if any) it has accepted, (2) do not accept any proposal numbered less than n. (b) Accept the proposal in the accept request unless it has already responded to a prepare request having a higher number. Phase 1 Phase 2 Proposer Acceptor

Paxos CS 5204 – Fall, 2008 Chubby – applying Paxos A high-availability lock service Stores small files for applications having elected primary servers to advertise their existence and parameters Based on replicated architecture with elected master Used by GFS, Bigtable

Paxos CS 5204 – Fall, 2008 Chubby – Paxos framework

Paxos CS 5204 – Fall, 2008 Chubby – Replica Architecture