CHUBBY and PAXOS Sergio Bernales 1Dennis Kafura – CS5204 – Operating Systems.

Slides:



Advertisements
Similar presentations
Paxos and Zookeeper Roy Campbell.
Advertisements

Wait-free coordination for Internet-scale systems
Paxos Made Simple Leslie Lamport. Introduction ► Lock is the easiest way to manage concurrency  Mutex and semaphore.  Read and write locks in 2PL for.
NETWORK ALGORITHMS Presenter- Kurchi Subhra Hazra.
CS 5204 – Operating Systems1 Paxos Student Presentation by Jeremy Trimble.
Distributed Systems Overview Ali Ghodsi
Consensus Hao Li.
Chubby Lock server for distributed applications 1Dennis Kafura – CS5204 – Operating Systems.
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.
Distributed Systems CS Google Chubby and Message Ordering Recitation 4, Sep 29, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud.
The Chubby lock service for loosely-coupled distributed systems Presented by Petko Nikolov Cornell University 3/12/09.
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.
Chapter 18: Distributed Coordination (Chapter 18.1 – 18.5)
EEC 688/788 Secure and Dependable Computing Lecture 12 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Chapter 6 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University Building Dependable Distributed Systems.
Eddie Bortnikov & Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Recitation.
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Vector timestamps Global state –Distributed Snapshot Election algorithms.
State Machines CS 614 Thursday, Feb 21, 2002 Bill McCloskey.
Distributed storage for structured data
Team CMD Distributed Systems Team Report 2 1/17/07 C:\>members Corey Andalora Mike Adams Darren Stanley.
The Chubby lock service for loosely-coupled distributed systems Mike Burrows (Google), OSDI 2006 Shimin Chen Big Data Reading Group.
Transactions and Reliability. File system components Disk management Naming Reliability  What are the reliability issues in file systems? Security.
Commit Protocols. CS5204 – Operating Systems2 Fault Tolerance Causes of failure: process failure machine failure network failure Goals : transparent:
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.
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Vector timestamps Global state –Distributed Snapshot Election algorithms –Bully algorithm.
Paxos A Consensus Algorithm for Fault Tolerant Replication.
Commit Algorithms Hamid Al-Hamadi CS 5204 November 17, 2009.
Lock Services in Distributed File Systems Shaan Mahbubani Anshuman Gupta Ravi Vijay Anup Tapadia UCSD CSE 221 Operating Systems - Winter 07.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Google Chubby Lock Service Steve Ko Computer Sciences and Engineering University at Buffalo.
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.
1 Lecture 19: Scalable Protocols & Synch Topics: coherence protocols for distributed shared-memory multiprocessors and synchronization (Sections )
Implementing Replicated Logs with Paxos John Ousterhout and Diego Ongaro Stanford University Note: this material borrows heavily from slides by Lorenzo.
Mutual Exclusion Algorithms. Topics r Defining mutual exclusion r A centralized approach r A distributed approach r An approach assuming an organization.
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.
ZOOKEEPER. CONTENTS ZooKeeper Overview ZooKeeper Basics ZooKeeper Architecture Getting Started with ZooKeeper.
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 Chubby lock service for loosely-coupled distributed systems Mike Burrows, Google Inc. Presented By: Harish Rayapudi, Shiva Prasad Malladi.
Ion Stoica, UC Berkeley November 7, 2016
The consensus problem in distributed systems
Transactions and Reliability
Distributed Systems – Paxos
View Change Protocols and Reconfiguration
EECS 498 Introduction to Distributed Systems Fall 2017
EECS 498 Introduction to Distributed Systems Fall 2017
Ali Ghodsi and Ion Stoica, UC Berkeley February 21, 2018
Fault-tolerance techniques RSM, Paxos
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
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
Lecture 18: Coherence and Synchronization
Paxos Made Simple.
Implementing Consistency -- Paxos
Presentation transcript:

CHUBBY and PAXOS Sergio Bernales 1Dennis Kafura – CS5204 – Operating Systems

chubby and paxos Overview Chubby  Why?  How?  More precise how Paxos  Why?  How?  More precise why Dennis Kafura – CS5204 – Operating Systems2

chubby and paxos 10 – 30,000 Clients Different client services Who is in charge? Guarantee it? What if you go down? i.e. DNS Server Dennis Kafura – CS5204 – Operating Systems3

chubby and paxos Service Requirements Easy for client developers (of the variety kind) Reliable and Available Master is clear –hint, hint Paxos Thousands of clients, tiny things Growing clients = growing transactions Dennis Kafura – CS5204 – Operating Systems4

chubby and paxos Chubby Coarse-grained lock service Caching Event Notification Access Control Lists /ls/foo/wombat/pouch Dennis Kafura – CS5204 – Operating Systems5

chubby and paxos System Structure Dennis Kafura – CS5204 – Operating Systems6 Cache: data, metadata, absent file, handles (invalidated when data is changed)

chubby and paxos Files, Directories, Handles /ls/foo/wombat/pouch ACL  Controls: reading, writing, ACL changes  ACL authentication in RPC Meta-data of node (64 bits entries) Dennis Kafura – CS5204 – Operating Systems7 Instance Number Content generation number Lock generation ACL generation

chubby and paxos Sequencer Sequence numbers provided only for interactionc that use locks Request sequencer  Name of lock  Acquisition mode (exclusive, shared)  Lock generation number Lock delay Dennis Kafura – CS5204 – Operating Systems8

chubby and paxos API (1 of 2) Open(/ls/foo/wombat/pouch )* Close()  Poison() GetContentAndStats()  getStat()  ReadDir() SetContents()  Compare and swap Delete() Acquire(), TryAcquire(), Release() Dennis Kafura – CS5204 – Operating Systems9

chubby and paxos API (2 of 2) GetSequencer() SetSequencer() CheckSequencer() Dennis Kafura – CS5204 – Operating Systems10

chubby and paxos Sessions Keeps locks active Data consistent Survives failures KeepAlives  Most calls are KeepAlives Dennis Kafura – CS5204 – Operating Systems11

chubby and paxos Events Subcribe to  Contents modified  Child node added  Chubby master fail  Handle has become invalid  Lock acquired  Conflicting lock request Dennis Kafura – CS5204 – Operating Systems12

chubby and paxos Efficiency Atomic operations No current directories No last access times Proxies KeepAlive replies used to transmit events and cache invalidations Dennis Kafura – CS5204 – Operating Systems13

chubby and paxos Back to the DNS Server Chubby caches Chubby batches Don’t use as fileserver Do use for config files, elect masters Dennis Kafura – CS5204 – Operating Systems14

chubby and paxos Master Fail - Over Dennis Kafura – CS5204 – Operating Systems15

chubby and paxos Recover 1. Pick a new client epoch number(sent by clients) 2. Master responds to master location requests 3. Rebuilds session memory strucuture 4. KeepAlives allowed 5. Notifies clients of failure 6. Master waits sessions syncs 7. Fully operational 8. While operating, handles are verified 9. Ephemeral files removed Dennis Kafura – CS5204 – Operating Systems16

chubby and paxos Intro Paxos A consensus algorithm 1. Only a value that has been proposed may be chosen 2. Only a single value is chosen 3. Unless value actually chosen, process don’t learn about it If someone disagrees, no one has agreed Dennis Kafura – CS5204 – Operating Systems17

chubby and paxos Paxos Proposers, Acceptors, Learners Multiples of each System assumes failure Data never corrupted Dennis Kafura – CS5204 – Operating Systems18

chubby and paxos Choosing a Value P1- An acceptor must accept the first proposal it receives Problem  Several values proposed, none chosen  Possible to accept multiple A solution: number proposals Dennis Kafura – CS5204 – Operating Systems19

chubby and paxos Choosing a Value P2- If a proposal with value v is chosen, then every higher numbered proposal that is chosen has value v P2a- If a proposal with value v is chosen, then every higher accepted by any proposer has value v P2b- If a proposal with value v is chosen, then every higher accepted by any proposer has value v Dennis Kafura – CS5204 – Operating Systems20

chubby and paxos Choosing a Value P2c- 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-numbered proposal among all proposals numbered less than n accepted by the acceptors in S P1a- An acceptor can accept a proposal, iff if has not reponded to a prepare request having a number greater than n Dennis Kafura – CS5204 – Operating Systems21

chubby and paxos Algorithm Phase 1 a) Proposer selects proposal number n and sends prepare request to majority of acceptors b) If acceptor receives request number n greater than that of any other prepare request it has accepted, it sends back promise not to accept any more and also it’s last n Phase 2 a) Proposer receives prepare request form majority of acceptors, then sends the proposal number n plus the actual value v b) If acceptor receives accept request for proposal n, accepts it only if it has not responded to another prepare request. Dennis Kafura – CS5204 – Operating Systems22

chubby and paxos Learn a Chosen Value Chosen value propagated  All acceptors send messages to learners  Distinguished learner gets the message, passes it on  Distinguished learnerS  Learner ask acceptors Distinguished Acceptors Dennis Kafura – CS5204 – Operating Systems23