Fault Tolerance via the State Machine Replication Approach Favian Contreras.

Slides:



Advertisements
Similar presentations
Global States.
Advertisements

CS 542: Topics in Distributed Systems Diganta Goswami.
CS 5204 – Operating Systems1 Paxos Student Presentation by Jeremy Trimble.
Distributed Systems Overview Ali Ghodsi
Replication Management. Motivations for Replication Performance enhancement Increased availability Fault tolerance.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Byzantine Fault Tolerance Steve Ko Computer Sciences and Engineering University at Buffalo.
Byzantine Generals Problem: Solution using signed messages.
Distributed Systems Fall 2010 Replication Fall 20105DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
CS 582 / CMPE 481 Distributed Systems Fault Tolerance.
CS 582 / CMPE 481 Distributed Systems
CMPT 431 Dr. Alexandra Fedorova Lecture XII: Replication.
EEC 688/788 Secure and Dependable Computing Lecture 12 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 16 Wenbing Zhao Department of Electrical and Computer Engineering.
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 15 Wenbing Zhao Department of Electrical and Computer Engineering.
Replication Management using the State-Machine Approach Fred B. Schneider Summary and Discussion : Hee Jung Kim and Ying Zhang October 27, 2005.
2/23/2009CS50901 Implementing Fault-Tolerant Services Using the State Machine Approach: A Tutorial Fred B. Schneider Presenter: Aly Farahat.
1 Principles of Reliable Distributed Systems Lecture 5: Failure Models, Fault-Tolerant Broadcasts and State-Machine Replication Spring 2005 Dr. Idit Keidar.
CS294, YelickConsensus, p1 CS Consensus
Distributed Systems Fall 2009 Replication Fall 20095DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
EEC 688/788 Secure and Dependable Computing Lecture 13 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
EEC-681/781 Distributed Computing Systems Lecture 10 Wenbing Zhao Cleveland State University.
CMPT 401 Summer 2007 Dr. Alexandra Fedorova Lecture XII: Replication.
State Machines CS 614 Thursday, Feb 21, 2002 Bill McCloskey.
Election Algorithms. Topics r Issues r Detecting Failures r Bully algorithm r Ring algorithm.
Paxos Made Simple Jinghe Zhang. Introduction Lock is the easiest way to manage concurrency Mutex and semaphore. Read and write locks. In distributed system:
Distributed Algorithms – 2g1513 Lecture 9 – by Ali Ghodsi Fault-Tolerance in Distributed Systems.
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
Reliable Communication in the Presence of Failures Based on the paper by: Kenneth Birman and Thomas A. Joseph Cesar Talledo COEN 317 Fall 05.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Replication with View Synchronous Group Communication Steve Ko Computer Sciences and Engineering.
Replicated State Machines ITV Model-based Analysis and Design of Embedded Software Techniques and methods for Critical Software Anders P. Ravn Aalborg.
Practical Byzantine Fault Tolerance
Byzantine fault-tolerance COMP 413 Fall Overview Models –Synchronous vs. asynchronous systems –Byzantine failure model Secure storage with self-certifying.
1 ZYZZYVA: SPECULATIVE BYZANTINE FAULT TOLERANCE R.Kotla, L. Alvisi, M. Dahlin, A. Clement and E. Wong U. T. Austin Best Paper Award at SOSP 2007.
IM NTU Distributed Information Systems 2004 Replication Management -- 1 Replication Management Yih-Kuen Tsay Dept. of Information Management National Taiwan.
Agenda Fail Stop Processors –Problem Definition –Implementation with reliable stable storage –Implementation without reliable stable storage Failure Detection.
Replication (1). Topics r Why Replication? r System Model r Consistency Models – How do we reason about the consistency of the “global state”? m Data-centric.
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
Fault Tolerant Services
CSE 60641: Operating Systems Implementing Fault-Tolerant Services Using the State Machine Approach: a tutorial Fred B. Schneider, ACM Computing Surveys.
Consensus and leader election Landon Cox February 6, 2015.
D u k e S y s t e m s Asynchronous Replicated State Machines (Causal Multicast and All That) Jeff Chase Duke University.
Chapter 4 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University Building Dependable Distributed Systems.
UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department
Hwajung Lee.  Improves reliability  Improves availability ( What good is a reliable system if it is not available?)  Replication must be transparent.
Systems Research Barbara Liskov October Replication Goal: provide reliability and availability by storing information at several nodes.
Replication Improves reliability Improves availability ( What good is a reliable system if it is not available?) Replication must be transparent and create.
EEC 688/788 Secure and Dependable Computing Lecture 9 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
A Survey of Fault Tolerance in Distributed Systems By Szeying Tan Fall 2002 CS 633.
CSci8211: Distributed Systems: State Machines 1 Detour: Some Theory of Distributed Systems Supplementary Materials  Replicated State Machines Notion of.
Distributed Systems Lecture 9 Leader election 1. Previous lecture Middleware RPC and RMI – Marshalling 2.
Fail-Stop Processors UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau One paper: Byzantine.
Fundamentals of Fault-Tolerant Distributed Computing In Asynchronous Environments Paper by Felix C. Gartner Graeme Coakley COEN 317 November 23, 2003.
EEC 688/788 Secure and Dependable Computing Lecture 10 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Replication Hari Shreedharan. Papers! ● Implementing Fault-Tolerant Services using the State Machine Approach (Dec, 1990) Fred B. Schneider Cornell University.
Reliable multicast Tolerates process crashes. The additional requirements are: Only correct processes will receive multicasts from all correct processes.
BChain: High-Throughput BFT Protocols
The consensus problem in distributed systems
Distributed Systems – Paxos
View Change Protocols and Reconfiguration
Implementing Consistency -- Paxos
Outline Announcements Fault Tolerance.
Replication Improves reliability Improves availability
Fault-tolerance techniques RSM, Paxos
UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department
Fault-Tolerant State Machine Replication
Fault-Tolerant State Machine Replication
EECS 498 Introduction to Distributed Systems Fall 2017
Distributed Systems CS
Implementing Consistency -- Paxos
Presentation transcript:

Fault Tolerance via the State Machine Replication Approach Favian Contreras

Implementing Fault-Tolerant Services Using the State Machine Approach: A Tutorial Written by Fred Schneider

Why a Tutorial? The “State Machine Approach” was introduced by Leslie Lamport in “Time, Clocks and Ordering of Events in Distributed Systems.”

Problem Data storage needs to be able to tolerate faults! How do we do this? Replicate data in a smart and efficient way!!!

Outline State machines Faults State Machine Replication Failures Outside the state machines Reconfiguring Chain Replication

State Machines State Variables Deterministic Commands

Requests and Causality, Happens Before Tutorial Process order consistent with potentially causality. Client A sends r, then r'. r is processed before r'. r causes Client B to send r'. r is processed before r'.

State Machine Coding State Machines are procedures Client calls procedure Avoid loops. More flexible structure.

Consensus Termination Validity Integrity Agreement Ensures procedures are called in same order across all machines

Outline State machines Faults State Machine Replication Failures Outside the state machines Reconfiguring Chain Replication

Faults Byzantine Faults:  Malicious/arbitrary behavior by faulty components.  Weakest possible failure assumption. Fail-Stop Faults:  Changes to fail state and stops. Crash Faults:  Not mentioned in tutorial.  It is an omission failure, similar to fail-stop

Tolerating Faults t fault tolerant – ≤ t components become faulty – Simply where the guarantees end. Statistical Measures – Mean time between failures – Probability of failure over interval – other

Tolerating Faults t fault tolerant – ≤ t components become faulty – Simply where the guarantees end. Statistical Measures – Mean time between failures – Probability of failure over interval – other

Outline State machines Faults State Machine Replication Failures Outside the state machines Reconfiguring Chain Replication

Fault Tolerant State Machines Implement the state machine on multiple processors. State Machine Replication  Each starts in the same initial state  Executes the same requests  Requires consensus to execute in same order  Deterministic, each will do the exact same thing  Produce the same output.

t Fault-Tolerance Replicas need to be coordinated Replica coordination:  Agreement: Every non-faulty replica receives every request.  Order: Every non-faulty replica processes the requests in the same relative order.

t Fault-Tolerance Byzantine Faults:  How many replicas needed in general?  Why? Fail-Stop Faults:  How many replicas needed in general?  Why?

Outline State machines Faults State Machine Replication  Agreement  Ordering Failures Outside the state machines Reconfiguring Chain Replication

Agreement “The transmitter” disseminates a value, then:  IC1: All non-faulty processors agree on the same value  IC2: If transmitter is non-faulty, agree on its value. Client can  be the transmitter  send request to one replica, who is transmitter

Outline State machines Faults State Machine Replication  Agreement  Ordering Failures Outside the state machines Reconfiguring Chain Replication

Ordering Unique identifier, uid on each request Total ordering on uid. Request, r is stable if  Cannot receive request with uid(r') < uid(r) Process a request once it is stable. Logical clocks can be the basis for unique id. Stability tests for logical clocks? – Byzantine faults?

Ordering Can use synchronized real-time clocks. Max one request at every tick. If clocks synchronized within δ,  Message delay > δ Stability tests? Potential Problems? – State Machine lag behind clients by Δ (test 1) – Never passed on crash failures (test 2)

More Ordering... Can the replicas generate uid's? Of course! Consensus is the key! State machines propose candidate id's. One of these selected, becomes unique id.

Constraints UID1: cuid(sm i,r) <= uid(r). UID2: If a request r' is seen by sm i after r has been accepted by sm i, then uid(r') < cuid(sm i,r').

How to generate uid's? Requirements:  UID1 and UID2 be satisfied  r != r' uid(r) != uid(r')  Every request seen is eventually accepted. Define:  SEEN(i) = largest cuid(sm i,r) assigned to any request so far seen at sm i  ACCEPT(i) = largest cuid(sm i,r) assigned to any request so far accepted by sm i

Generating uid's.... cuid(sm i,r) = max (SEEN(i), ACCEPT(i)) i/N. uid(r) = max ( cuid(sm i,r) ) Stability test? Potential Problems? – Could affect causality of requests – Client does not communicate until request is accepted. More or less communication needed?

Outline State machines Faults State Machine Replication Failures Outside the state machines Reconfiguring Chain Replication

Tolerating failures Failed output device or voter:  Replicate?  Use physical properties to tolerate failures, like the flaps example in the paper.  Add enough redundancy in fail-stop systems Client Failure:  Who cares?  If sharing processor, use that SM

Outline State machines Faults State Machine Replication Failures Outside the state machines Reconfiguring Chain Replication

Reconfiguration Would removing failed systems help us tolerate more faults? Yes, it seems! P(t) = total processor at time t F(t) = Failed Processors at time t Assume Combine function, P(t) – F(t) > Enuf Enuf = P(t)/2 for byzantine failures Enuf = 0 for fail-stop.

Reconfiguration F1: If Byzantine failures, then faulty machines are removed from the system before combining function is violated. F2: In any case, repaired processors are added before combining function is violated. Might actually improve system performance. Fewer messages, faster consensus.

Integrating repaired objects Element must be non-faulty and must have the current state before it can proceed. If it is a replica, and failure is fail-stop: – Receive a checkpoint/state from another replica. – Forward messages, until it gets the ordered messages from client. Byzantine fault?

Discussion Why does any of this matter? What is the best case scenario in terms of replications for fault tolerance? Is the state machine approach still feasible? Are there any other ways to handle BFT? Which was the most interesting?

Takeaways The State Machine approach is flexible. Replication with consensus, given deterministic machines, provides fault tolerance. Depending on assumptions, may need more replications, may use different strategies.

Outline State machines Faults State Machine Replication Failures Outside the state machines Reconfiguring Chain Replication

Chain Replication For Supporting High Throughput and Availability Robert Van Renesse Fred Schneider

Primary-Backup Different from State Machine Replication? Serial version of State Machine Replication Only the primary does the processing Updates sent to the backups.

Chain Replication Assumes: No partition tolerance. Chain replication: Consistency, availability. A partitioned server == failed server. High Throughput. Fail-stop processors. A universally accessible, failure resistant or replicated Master, which can detect failures.

Serial State Machine Replication

Reads and Writes Reads go to any non-faulty tail.  Just tail, 1 server per chain Writes propagate through all non-faulty servers.  t-1 severs per chain

Master!! Assumed to never fail or replicated w/ Paxos Head fails? Tail fails? Other fails?

Sources Fred Schneider photo: s/pages/fred.schneider.sailing.c%26c.htm s/pages/fred.schneider.sailing.c%26c.htm Robert van Renesse photo: 01/bios.htm 01/bios.htm Most Slides: Hari Shreedharan, 9fa/lectures/23-replication.pdf 9fa/lectures/23-replication.pdf State Machine photo: 9/9e/Turnstile_state_machine_colored.svg 9/9e/Turnstile_state_machine_colored.svg

Extras!!!

Storage Systems Store objects. Query existing objects. Update existing objects. Usually offers strong consistency guarantees. Request processed based on some order. Effect of updates reflected in subsequent queries.

Handling failures Failures are detected by God/Master. On detecting failure, Master:  informs its predecessor or successor in the chain  informs each node its new neighbors Clients ask the master for information regarding the head and the tail.

Adding a new replica Current tail, T notified it is no longer the tail. State, Un-ACK-ed requests now transmitted to the new tail. Master notified of the new tail. Clients notified of new tail.

Unavailability Head failure:  Query processing uninterrupted,  update processing unavailable till new head takes on responsibility. Middle failure:  Query processing uninterrupted,  update processing might be delayed. Tail failure:  Query and update processing unavailable, until new tail takes over.