Today: Fault Tolerance. Reliable One-One Communication

Similar documents
Today: Fault Tolerance. Failure Masking by Redundancy

Today: Fault Tolerance. Replica Management

Today: Fault Tolerance. Fault Tolerance

MYE017 Distributed Systems. Kostas Magoutis

Fault Tolerance. Distributed Systems IT332

MYE017 Distributed Systems. Kostas Magoutis

CprE Fault Tolerance. Dr. Yong Guan. Department of Electrical and Computer Engineering & Information Assurance Center Iowa State University

Fault Tolerance. Distributed Systems. September 2002

Today: Fault Tolerance

Fault Tolerance Part II. CS403/534 Distributed Systems Erkay Savas Sabanci University

Recovering from a Crash. Three-Phase Commit

Fault Tolerance. Chapter 7

Fault Tolerance. o Basic Concepts o Process Resilience o Reliable Client-Server Communication o Reliable Group Communication. o Distributed Commit

Basic concepts in fault tolerance Masking failure by redundancy Process resilience Reliable communication. Distributed commit.

Fault Tolerance. Basic Concepts

Fault Tolerance. Fall 2008 Jussi Kangasharju

Distributed Systems COMP 212. Lecture 19 Othon Michail

Problem: if one process cannot perform its operation, it cannot notify the. Thus in practise better schemes are needed.

CSE 5306 Distributed Systems

CSE 5306 Distributed Systems. Fault Tolerance

Chapter 8 Fault Tolerance

Fault Tolerance 1/64

Distributed Systems Fault Tolerance

Chapter 8 Fault Tolerance


Clock and Time. THOAI NAM Faculty of Information Technology HCMC University of Technology

(Pessimistic) Timestamp Ordering

(Pessimistic) Timestamp Ordering. Rules for read and write Operations. Read Operations and Timestamps. Write Operations and Timestamps

Failure Tolerance. Distributed Systems Santa Clara University

Distributed Systems Principles and Paradigms. Chapter 08: Fault Tolerance

Dep. Systems Requirements

Distributed Systems Principles and Paradigms

Distributed Systems

Recovery. Independent Checkpointing

Chapter 5: Distributed Systems: Fault Tolerance. Fall 2013 Jussi Kangasharju

Fault Tolerance. Goals: transparent: mask (i.e., completely recover from) all failures, or predictable: exhibit a well defined failure behavior

Distributed System. Gang Wu. Spring,2018

Distributed Systems Reliable Group Communication

Today CSCI Recovery techniques. Recovery. Recovery CAP Theorem. Instructor: Abhishek Chandra

Fault Tolerance Causes of failure: process failure machine failure network failure Goals: transparent: mask (i.e., completely recover from) all

Distributed Systems Principles and Paradigms

Distributed Systems Principles and Paradigms

0: BEGIN TRANSACTION 1: W = 1 2: X = W + 1 3: Y = X * 2 4: COMMIT TRANSACTION

Failure Models. Fault Tolerance. Failure Masking by Redundancy. Agreement in Faulty Systems

Module 8 Fault Tolerance CS655! 8-1!

Beyond FLP. Acknowledgement for presentation material. Chapter 8: Distributed Systems Principles and Paradigms: Tanenbaum and Van Steen

Distributed systems. Lecture 6: distributed transactions, elections, consensus and replication. Malte Schwarzkopf

Distributed Computing. CS439: Principles of Computer Systems November 20, 2017

Last Class: Clock Synchronization. Today: More Canonical Problems

Distributed Systems. 09. State Machine Replication & Virtual Synchrony. Paul Krzyzanowski. Rutgers University. Fall Paul Krzyzanowski

Fault Tolerance. it continues to perform its function in the event of a failure example: a system with redundant components

Distributed Computing. CS439: Principles of Computer Systems November 19, 2018

Proseminar Distributed Systems Summer Semester Paxos algorithm. Stefan Resmerita

Distributed Commit in Asynchronous Systems

Rollback-Recovery p Σ Σ

Networked Systems and Services, Fall 2018 Chapter 4. Jussi Kangasharju Markku Kojo Lea Kutvonen

CS 347 Parallel and Distributed Data Processing

PRIMARY-BACKUP REPLICATION

Distributed Transactions

Module 8 - Fault Tolerance

Exam 2 Review. October 29, Paul Krzyzanowski 1

The objective. Atomic Commit. The setup. Model. Preserve data consistency for distributed transactions in the presence of failures

Last time. Distributed systems Lecture 6: Elections, distributed transactions, and replication. DrRobert N. M. Watson

Consensus and related problems

COMMENTS. AC-1: AC-1 does not require all processes to reach a decision It does not even require all correct processes to reach a decision

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 21: Network Protocols (and 2 Phase Commit)

CSE 544 Principles of Database Management Systems. Alvin Cheung Fall 2015 Lecture 14 Distributed Transactions

Fault Tolerance. Distributed Software Systems. Definitions

Primary-Backup Replication

MODELS OF DISTRIBUTED SYSTEMS

CS /15/16. Paul Krzyzanowski 1. Question 1. Distributed Systems 2016 Exam 2 Review. Question 3. Question 2. Question 5.

Fault Tolerance Part I. CS403/534 Distributed Systems Erkay Savas Sabanci University

Database Management System

CS 4604: Introduc0on to Database Management Systems. B. Aditya Prakash Lecture #19: Logging and Recovery 1

CS 347: Distributed Databases and Transaction Processing Notes07: Reliable Distributed Database Management

Carnegie Mellon Univ. Dept. of Computer Science Database Applications. General Overview NOTICE: Faloutsos CMU SCS

Three Models. 1. Time Order 2. Distributed Algorithms 3. Nature of Distributed Systems1. DEPT. OF Comp Sc. and Engg., IIT Delhi

6.033 Spring 2016 Lecture #18. Distributed transactions Multi-site atomicity Two-phase commit

CS 425 / ECE 428 Distributed Systems Fall 2017

Causal Consistency and Two-Phase Commit

Synchronization. Chapter 5

NOTES W2006 CPS610 DBMS II. Prof. Anastase Mastoras. Ryerson University

MODELS OF DISTRIBUTED SYSTEMS

ATOMIC COMMITMENT Or: How to Implement Distributed Transactions in Sharded Databases

6.033 Computer System Engineering

6.033 Spring Lecture #18. Distributed transactions Multi-site atomicity Two-phase commit spring 2018 Katrina LaCurts

The challenges of non-stable predicates. The challenges of non-stable predicates. The challenges of non-stable predicates

Synchronization Part 2. REK s adaptation of Claypool s adaptation oftanenbaum s Distributed Systems Chapter 5 and Silberschatz Chapter 17

Transactions. CS 475, Spring 2018 Concurrent & Distributed Systems

Parallel Data Types of Parallelism Replication (Multiple copies of the same data) Better throughput for read-only computations Data safety Partitionin

FAULT TOLERANCE. Fault Tolerant Systems. Faults Faults (cont d)

DISTRIBUTED COMPUTER SYSTEMS

Distributed Systems. Characteristics of Distributed Systems. Lecture Notes 1 Basic Concepts. Operating Systems. Anand Tripathi

Distributed Systems. Characteristics of Distributed Systems. Characteristics of Distributed Systems. Goals in Distributed System Designs

Last Class: Clock Synchronization. Today: More Canonical Problems

Fault tolerance with transactions: past, present and future. Dr Mark Little Technical Development Manager, Red Hat

RECOVERY CHAPTER 21,23 (6/E) CHAPTER 17,19 (5/E)

Page 1. Goals of Today s Lecture. The ACID properties of Transactions. Transactions

EECS 591 DISTRIBUTED SYSTEMS

ARIES (& Logging) April 2-4, 2018

Transcription:

Today: Fault Tolerance Reliable communication Distributed commit Two phase commit Three phase commit Failure recovery Checkpointing Message logging Lecture 17, page 1 Reliable One-One Communication Issues were discussed in Lecture 3 Use reliable transport protocols (TCP) or handle at the application layer RPC semantics in the presence of failures Possibilities Client unable to locate server Lost request messages Server crashes after receiving request Lost reply messages Client crashes after sending request Lecture 17, page 2

Reliable One-Many Communication Reliable multicast Lost messages => need to retransmit Possibilities ACK-based schemes Sender can become bottleneck NACK-based schemes Lecture 17, page 3 Atomic Multicast Atomic multicast: a guarantee that all process received the message or none at all Replicated database example Problem: how to handle process crashes? Solution: group view Each message is uniquely associated with a group of processes View of the process group when message was sent All processes in the group should have the same view (and agree on it) Virtually Synchronous Multicast Lecture 17, page 4

Implementing Virtual Synchrony in Isis a) Process 4 notices that process 7 has crashed, sends a view change b) Process 6 sends out all its unstable messages, followed by a flush message c) Process 6 installs the new view when it has received a flush message from everyone else Lecture 17, page 5 Distributed Commit Atomic multicast example of a more general problem All processes in a group perform an operation or not at all Examples: Reliable multicast: Operation = delivery of a message Distributed transaction: Operation = commit transaction Problem of distributed commit All or nothing operations in a group of processes Possible approaches Two phase commit (2PC) [Gray 1978 ] Three phase commit Lecture 17, page 6

Two Phase Commit Coordinator process coordinates the operation Involves two phases Voting phase: processes vote on whether to commit Decision phase: actually commit or abort Lecture 17, page 7 Implementing Two-Phase Commit actions by coordinator: while START _2PC to local log; multicast VOTE_REQUEST to all participants; while not all votes have been collected { wait for any incoming vote; if timeout { while GLOBAL_ABORT to local log; multicast GLOBAL_ABORT to all participants; exit; record vote; if all participants sent VOTE_COMMIT and coordinator votes COMMIT{ write GLOBAL_COMMIT to local log; multicast GLOBAL_COMMIT to all participants; else { write GLOBAL_ABORT to local log; multicast GLOBAL_ABORT to all participants; Outline of the steps taken by the coordinator in a two phase commit protocol Lecture 17, page 8

actions by participant: write INIT to local log; wait for VOTE_REQUEST from coordinator; if timeout { write VOTE_ABORT to local log; exit; if participant votes COMMIT { write VOTE_COMMIT to local log; send VOTE_COMMIT to coordinator; wait for DECISION from coordinator; if timeout { multicast DECISION_REQUEST to other participants; Implementing 2PC wait until DECISION is received; /* remain blocked */ write DECISION to local log; if DECISION == GLOBAL_COMMIT write GLOBAL_COMMIT to local log; else if DECISION == GLOBAL_ABORT write GLOBAL_ABORT to local log; else { write VOTE_ABORT to local log; send VOTE ABORT to coordinator; actions for handling decision requests: /*executed by separate thread */ while true { wait until any incoming DECISION_REQUEST is received; /* remain blocked */ read most recently recorded STATE from the local log; if STATE == GLOBAL_COMMIT send GLOBAL_COMMIT to requesting participant; else if STATE == INIT or STATE == GLOBAL_ABORT send GLOBAL_ABORT to requesting participant; else skip; /* participant remains blocked */ Lecture 17, page 9 Three-Phase Commit Two phase commit: problem if coordinator crashes (processes block) Three phase commit: variant of 2PC that avoids blocking Lecture 17, page 10

Recovery Techniques thus far allow failure handling Recovery: operations that must be performed after a failure to recover to a correct state Techniques: Checkpointing: Periodically checkpoint state Upon a crash roll back to a previous checkpoint with a consistent state Lecture 17, page 11 Independent Checkpointing Each processes periodically checkpoints independently of other processes Upon a failure, work backwards to locate a consistent cut Problem: if most recent checkpoints form inconsistenct cut, will need to keep rolling back until a consistent cut is found Cascading rollbacks can lead to a domino effect. Lecture 17, page 12

Coordinated Checkpointing Take a distributed snapshot [discussed in Lec 11] Upon a failure, roll back to the latest snapshot All process restart from the latest snapshot Lecture 17, page 13 Message Logging Checkpointing is expensive All processes restart from previous consistent cut Taking a snapshot is expensive Infrequent snapshots => all computations after previous snapshot will need to be redone [wasteful] Combine checkpointing (expensive) with message logging (cheap) Take infrequent checkpoints Log all messages between checkpoints to local stable storage To recover: simply replay messages from previous checkpoint Avoids recomputations from previous checkpoint Lecture 17, page 14