Distributed Eventual Leader Election in the Crash-Recovery and General Omission Failure Models
Total Page:16
File Type:pdf, Size:1020Kb
University of the Basque Country UPV/EHU Department of Computer Architecture and Technology Distributed Eventual Leader Election in the Crash-Recovery and General Omission Failure Models Dissertation for the degree of Doctor of Philosophy Candidate Christian Fernández-Campusano Supervisors Roberto Cortiñas Mikel Larrea 2019 (c)2020 CHRISTIAN FERNANDEZ CAMPUSANO Abstract Distributed applications are present in many aspects of everyday life. Banking, healthcare, or transportation are some examples of such applications. These are built on top of distributed systems. Roughly speaking, a distributed system is composed of a set of processes which collaborate among them to achieve a common goal. When building such systems, designers have to cope with several issues, such as dierent synchrony assumptions and failure occurrences. Distributed systems must ensure that the delivered service is trustworthy. Agreement problems compose a fundamental class of problems in distributed systems. Agree- ment problems follow a similar pattern: all processes must agree on some common decision. Interestingly, most of the agreement problems can be considered as a particular instance of a problem called consensus, and, as a consequence, they can be solved by reduction to consensus. However, there exists a fundamental impossibility result, namely (FLP), which states that in an asynchronous distributed system, it is impossible to achieve consensus deterministically when at least one process may fail. A way to circumvent this obstacle is by using unreliable failure detectors. A failure detector is an abstraction that allows encapsulating synchrony assumptions of the system and provides (possibly incorrect) information about process failures. A particular failure detector, called Omega, has been shown to be the weakest failure detector for solving consensus with a majority of correct processes. Informally, Omega lies in providing an eventual leader election mechanism. In this work, we propose a distributed eventual leader election service prone to concurrent crash-recovery and omissions failures. Additionally, this work presents a performance study of consensus algorithms in omission and crash-recovery scenarios. The main contributions of this work are: (i) a novel denition of an eventual leader election service in distributed systems prone to failures of computation and connectivity, (ii) a specication of a weak system model for a distributed eventual leader election service, and (iii) three implementation approaches of a distributed eventual leader election service (Basic, Communication-Ecient and Indirect- Leader-Trusting Mechanism). ii Acknowledgements To my dear mother (RIP two years ago), a brave and courageous woman. To my dear father, wise and consequent. To my dear sisters and brothers, survivors of the dictatorship in Chile. To my dear friends... To my dear advisors... iv Preface This dissertation presents the results from the research carried out in the Distributed Systems Group at the University of the Basque Country UPV/EHU. Additionally, the part related to Distributed Eventual Leader Service was developed in collaboration with Michel Raynal, researcher member of the Institut Universitaire de France & IRISA. The published articles related to this thesis are listed below: • A Performance Study of Consensus Algorithms (Chapter3). – Conference papers: - Christian Fernández-Campusano, Roberto Cortiñas, Mikel Larrea. Improving the TrustedPals Framework Using Paxos. PDP 2013: Work in Progress Volume, pp. 15-16 (CORE C). - Christian Fernández-Campusano, Roberto Cortiñas, Mikel Larrea: Boosting Dependable Ubiquitous Computing: A Case Study. UCAmI 2013: 42-45 (WoS). - Christian Fernández-Campusano, Roberto Cortiñas, Mikel Larrea: A Perfor- mance Study of Consensus Algorithms in Omission and Crash-Recovery Scenarios. PDP 2014: 240-243 (CORE C). – Journal papers: - Christian Fernández-Campusano, Roberto Cortiñas, Mikel Larrea: Boosting Dependable Ubiquitous Computing: A Case Study . IEEE Latin America Transac- tions: Vol. 12, No. 3, pp. 442-448 (2014) (JCR). • Distributed Eventual Leader Election Service (Chapter4). – Conference papers: - Christian Fernández-Campusano, Roberto Cortiñas, Mikel Larrea: A Leader Election Service for Crash-Recovery and Omission Environments. UCAmI 2014: 320-323 (WoS). - Christian Fernández-Campusano, Mikel Larrea, Roberto Cortiñas, Michel Ray- nal: Eventual Leader Election Despite Crash-Recovery and Omission Failures. PRDC 2015: 209-214 (CORE B). - Christian Fernández-Campusano, Roberto Cortiñas, Mikel Larrea, Jian Tang: Designing and Evaluating Fault-tolerant Leader Election Algorithms. PDP 2015, Work in Progress Volume, pp. 3-4 (CORE C). - Christian Fernández-Campusano, Mikel Larrea, Roberto Cortiñas, Michel Ray- nal: A Communication-ecient Leader Election Algorithm in Partially Syn- chronous Systems prone to Crash-Recovery and Omission Failures. ICDCN 2016: 8:1-8:4 (CORE B). – Journal papers: - Christian Fernández-Campusano, Mikel Larrea, Roberto Cortiñas, Michel Ray- nal: A Distributed Leader Election Algorithm in Crash-Recovery and Omissive Systems. Information Processing Letters 2017, Volume 118: 100-104 (JCR). vi Contents Abstract i Acknowledgement iii Preface v Contents viii List of Figures ix List of Tables xi List of Algorithms xiii 1 Introduction1 1.1 Motivation......................................1 1.1.1 Aim of the Thesis..............................4 1.2 Contributions....................................5 1.3 Thesis Outline....................................6 2 Background7 2.1 Distributed Systems.................................7 2.1.1 Concurrent and Distributed Computing.................8 2.1.2 Safety and Liveness Properties......................9 2.1.3 Types of Distributed Systems.......................9 2.2 System Models for Distributed Systems...................... 11 2.2.1 Processes.................................. 11 2.2.2 Distributed Algorithms........................... 12 2.2.3 Communication Links........................... 13 2.2.4 Time and Timing Models......................... 15 2.2.5 Process Failure Models........................... 18 2.2.6 The Environment and Non-Determinism................. 21 2.3 Distributed Agreement Problems.......................... 22 2.3.1 The Non-Blocking Atomic Commitment Problem............ 22 2.3.2 The Consensus Problem.......................... 23 2.3.3 The Eventual Leader Election Problem.................. 25 2.4 Unreliable Failure Detectors............................ 26 2.4.1 Properties of Failure Detectors...................... 26 2.4.2 Failure Detector Classes.......................... 28 2.4.3 The Omega Failure Detector........................ 29 2.4.4 The Notion of Failure Detector Reduction................ 29 2.4.5 Approaches to Implementing Failure Detectors............. 31 2.5 Building Blocks for Fault-Tolerant Applications................. 31 vii 3 A Performance Study of Consensus Algorithms 33 3.1 The Study Context.................................. 33 3.2 An Overview of the Considered Consensus Algorithms............. 34 3.2.1 Chandra-Toueg’s Algorithm........................ 34 3.2.2 Lamport’s Paxos Algorithm........................ 35 3.2.3 Some Points of Comparison between both Algorithms......... 37 3.2.4 Both Algorithms Solve Fault-Tolerant Agreement............ 38 3.3 Case Study: Improving the TrustedPals Framework............... 38 3.3.1 Solving Yao’s Millionaire’s Problem.................... 39 3.3.2 A Proposal for Improving TrustedPals.................. 40 3.3.3 System Model and Assumptions...................... 41 3.3.4 Architecture of TrustedPals........................ 42 3.3.5 Obtaining ΩOm From a Simple Reduction of ^Pom ........... 42 3.3.6 A Novel Design of Architecture for TrustedPals............. 44 3.4 A Practical Comparison of both Consensus Algorithms............. 44 3.4.1 Related Studies............................... 45 3.4.2 Simulations................................. 45 3.5 Experimental Results................................ 47 3.5.1 Impact of Scalability on Average Latency................. 47 3.5.2 Understanding the Behavior of Average Latency............ 47 3.5.3 System under Multiple Simultaneous Failures.............. 51 3.6 Chapter Summary.................................. 53 4 Distributed Eventual Leader Election Service 55 4.1 Leader Election in Distributed Systems...................... 55 4.1.1 Synchrony and Failure Models...................... 56 4.1.2 Resilience to both Crash-Recovery and Omissions Failures....... 56 4.1.3 About the Detectability of Failures.................... 57 4.1.4 Failure Detection and Leader Election.................. 57 4.1.5 Communication Eciency......................... 58 4.2 System Model and Assumptions.......................... 58 4.3 Specifying an Eventual Leader Election Service.................. 60 4.3.1 From Ω to an Eventual Leader Election Functionality.......... 61 4.4 Diculties Underlying System Model Assumptions............... 63 4.5 Implementing an Eventual Leader Service..................... 64 4.5.1 Basic Eventual Leader Election...................... 65 4.5.2 Communication-Ecient Eventual Leader Election........... 71 4.5.3 Indirect-Leader Trusting Mechanism................... 78 4.6 Chapter Summary.................................. 86 5 Conclusions and Future Work 89 5.1 Research Assessment................................ 89 5.2 Future Work..................................... 91 References 93 viii List of Figures 2.1 Steps of a process.................................