Introduction

Consensus Crash Course

Optimistically Terminating Consensus designing reusable low-latency agreement protocols

Piotr Zieli´ nski Cavendish Laboratory University of Cambridge United Kingdom

6 July 2006

Piotr Zieli´ nski

Optimistically Terminating Consensus

Unifying framework

Introduction

Consensus Crash Course

Unifying framework

Agreement problems

Agreement on whether a transaction succeded or not (Atomic Commit) which client’s request arrived first (State Machine Replication) which server is the master (Leader Election) agreement problems are common but difficult because of failures Piotr Zieli´ nski

Optimistically Terminating Consensus

Introduction

Consensus Crash Course

Unifying framework

Agreement problems A A

B

C

B C

System assumptions message passing: communication by messages process failures: servers can crash

A

message loss: messages can get lost asynchrony: no time bounds for messages, no clocks Piotr Zieli´ nski

Optimistically Terminating Consensus

Introduction

Consensus Crash Course

Unifying framework

Consensus A B C

1 2

1

Consensus

1

2

1

propose

decide

Consensus Processes propose values and make decisions validity: decision is one of the proposals agreement: all decisions are the same termination: all correct processes decide

Piotr Zieli´ nski

Optimistically Terminating Consensus

Introduction

Consensus Crash Course

Unifying framework

Consensus Valid outcomes A B C

1 2

1 Cons

2

1 1

A B C

1 2 2

2 Cons

2 2

A B C

1 2 2

2 Cons

Consensus Processes propose values and make decisions validity: decision is one of the proposals agreement: all decisions are the same termination: all correct processes decide

Piotr Zieli´ nski

Optimistically Terminating Consensus

2

Introduction

Consensus Crash Course

Unifying framework

Consensus Valid outcomes A B C

1 2

1 Cons

2

1 1

A B C

1 2

2 Cons

2

2

2

1

1

A B C

1 2 2

2 Cons

2

Invalid outcomes A B C

1 2 2

3 Cons

3 3

A B C

2 2

Piotr Zieli´ nski

Cons

1 2

A B C

1 2

1 Cons

2

Optimistically Terminating Consensus

1

Introduction

Consensus Crash Course

Unifying framework

Consensus Valid outcomes A B C

1 2

1 Cons

2

1 1

A B C

1 2

2 Cons

2

2

2

1

2

A B C

1 2 2

2 Cons

2

Fault-tolerance A B C

1 2

2 Cons

2

A B C

A

2

Cons

2 B

2

Piotr Zieli´ nski

C

1 2

2 Cons

2

Optimistically Terminating Consensus

2

Introduction

Consensus Crash Course

Unifying framework

Consensus: current state A B C

1 2

1 Cons

2

1 1

A B C

1 2

2 Cons

2

2 2

A B C

1 2 2

2 Cons

Current state dozens of protocols in existence slight changes in assumptions require new protocols malicious participants 10+ pages of correctness proofs! highly non-trivial to design

Conclusion wasted effort → unified approach necessary Piotr Zieli´ nski

Optimistically Terminating Consensus

2

Introduction

Consensus Crash Course

Unifying framework

Consensus Crash Course

Consensus Crash Course

Piotr Zieli´ nski

Optimistically Terminating Consensus

Introduction

Consensus Crash Course

Unifying framework

Democracy vs. Dictatorship Democracy: majority wins A B C

1

1

1

1

2

1

A B C

1 1

A

1

2

B C

1

1

1 2

decision depends on all inputs: not recoverable with any failure Dictatorship: leader decides A B C

1

1

1

1

2

1

A B C

1

1

1 2

A B

1

C

1

1

1 2

decision depends on one input: not recoverable when leader fails Piotr Zieli´ nski

Optimistically Terminating Consensus

Introduction

Consensus Crash Course

Unifying framework

Two-step approach A B C

1

1

1

2

1

1

1

Algorithm 1

broadcast the message from the leader A

2

decide when received the same (1) from a majority ( A B ) assume a majority of processes are correct

majority contains a correct process → recovery always possible

Piotr Zieli´ nski

Optimistically Terminating Consensus

Introduction

Consensus Crash Course

Unifying framework

Two-step approach A B C

1

1

2

A B

1

C

no decision

1

1

2

1

1

A

1 1

B C

possibly 1

1

1

2

1

1

1 decision 1

Algorithm 1

broadcast the message from the leader A

2

decide when received the same (1) from a majority ( A B ) assume a majority of processes are correct

majority contains a correct process → recovery always possible

Piotr Zieli´ nski

Optimistically Terminating Consensus

Introduction

Consensus Crash Course

Unifying framework

Everything together

A B C

1

1

2

1

2 2

2

2

2

2

2

1

2 round 1

2

round 2

2

round 3

Complete Consensus algorithm each round as before: leader proposes, decision by majority if not successful, new round with new leader do not propose values conflicting with previous decisions Piotr Zieli´ nski

Optimistically Terminating Consensus

Introduction

Consensus Crash Course

Unifying Framework

Unifying Framework

Piotr Zieli´ nski

Optimistically Terminating Consensus

Unifying framework

Introduction

Consensus Crash Course

Unifying framework

Optimistically Terminating Consensus (OTC)

A B C

1

1

1

2

1

1

1

A B

1

1

1

2

1

1

1

C

2

Single round of Consensus second step isolated into OTC

2

propose the value 1 from the leader decide if receive the same from ≥ 2 processes 2 is a parameter

Piotr Zieli´ nski

Optimistically Terminating Consensus

OTC

Introduction

Consensus Crash Course

Unifying framework

Optimistically Terminating Consensus (OTC)

A B C

1

1

1

2

2 2

2

2

2

2

OTC as a black box one OTC per one Consensus round decision if all correct processes propose the same the decision is recoverably unique Piotr Zieli´ nski

2

2

2

2

1 2

2

Optimistically Terminating Consensus

2

Introduction

Consensus Crash Course

Unifying framework

Optimistically Terminating Consensus (OTC)

A B C

1

1

2

2

2

2 2

OTC as a black box one OTC per one Consensus round decision if all correct processes propose the same the decision is recoverably unique Piotr Zieli´ nski

2

2

2

2

1 2

2

Optimistically Terminating Consensus

2

Introduction

Consensus Crash Course

Malicious participants

Opportunities for cheating leader can send different proposals processes can modify forwarded messages recovery phase full algorithms very complicated Piotr Zieli´ nski

Optimistically Terminating Consensus

Unifying framework

Introduction

Consensus Crash Course

Unifying framework

Malicious participants

A B C

1

1

1

1

1

1

2

1

1

D 3

Opportunities for cheating leader can send different proposals processes can modify forwarded messages recovery phase full algorithms very complicated Piotr Zieli´ nski

Optimistically Terminating Consensus

Introduction

Consensus Crash Course

Unifying framework

Malicious participants

A B C D

1

1

1

1

1

1

2

1

1

3

A B C D

2

2

2

1

2

2

2

2

2

3

3

decision 1

A B C

?

?

?

1

1

1

2

2

2

3

D 3

decision 2

3

what happened?

Who is cheating? maybe A broadcast 1 to B , and 2 to C ? maybe B really received 2, and A is just slow? maybe C really received 1, and A is just slow? impossible to determine Piotr Zieli´ nski

Optimistically Terminating Consensus

Introduction

Consensus Crash Course

Unifying framework

Malicious participants A B C

1

1

1

1

1

1

1

1

2

1

1

1

D

Malicious participants three steps necessary [Castro and Liskov, 1999] 2nd and 3rd steps are OTCs no need to look inside OTCs to prove correctness (blackbox) composition of two OTCs is also an OTC Piotr Zieli´ nski

Optimistically Terminating Consensus

Introduction

Consensus Crash Course

Unifying framework

Malicious participants A B C

1

1

1

1

1

1

1

1

2

1

1

1

D 3

3

Malicious participants three steps necessary [Castro and Liskov, 1999] 2nd and 3rd steps are OTCs no need to look inside OTCs to prove correctness (blackbox) composition of two OTCs is also an OTC Piotr Zieli´ nski

Optimistically Terminating Consensus

Introduction

Consensus Crash Course

Unifying framework

Malicious participants A B C

1

1

1

1

1

1

1

1

2

1

1

1

D 3

3

Malicious participants three steps necessary [Castro and Liskov, 1999] 2nd and 3rd steps are OTCs no need to look inside OTCs to prove correctness (blackbox) composition of two OTCs is also an OTC Piotr Zieli´ nski

Optimistically Terminating Consensus

Introduction

Consensus Crash Course

Unifying framework

Malicious participants A B C

1

1

1

1

1

1

1

1

2

1

1

1

D 3

3

Malicious participants three steps necessary [Castro and Liskov, 1999] 2nd and 3rd steps are OTCs no need to look inside OTCs to prove correctness (blackbox) composition of two OTCs is also an OTC Piotr Zieli´ nski

Optimistically Terminating Consensus

Introduction

Consensus Crash Course

Unifying framework

Malicious participants

A B C D

1

1

1

SLOW

2

1

2

1

1

2

1

2 3

1 1

3

3

3

1

1

1

1

1

1

1

1

1

2

2

2

3

Malicious participants three steps necessary [Castro and Liskov, 1999] 2nd and 3rd steps are OTCs no need to look inside OTCs to prove correctness (blackbox) composition of two OTCs is also an OTC Piotr Zieli´ nski

Optimistically Terminating Consensus

3

Introduction

Consensus Crash Course

Unifying framework

Reconstructed algorithms Algorithm

Steps

Round 1

Processes

Chandra and Toueg [1996]

2

2

n > 2f

Lamport and Massa [2004]

2

2

n>f

Brasileiro et al. [2001]

1

3

n > 3f

cheap one-step (new)

1

3

n > 2f

cheap one-step Byzantine (new)

1

4

n > 3f

Martin and Alvisi [2004]

2

5

n > 5f

Castro and Liskov [1999]

3

3 3

n > 3f

2/3

3 3

n > 3f

3 3 3

n > 3f

Dutta et al. [2004] multi-step Byzantine (new) n: number of processes Piotr Zieli´ nski

2/3/4

f : number of failures Optimistically Terminating Consensus

Introduction

Consensus Crash Course

Unifying framework

OTC Summary Simple implementation broadcast and wait for a given number of replies simple to extend to custom failure models automatic verification and discovery possible [Zieli´ nski, 2006]

Reconstructs all known Consensus protocols even with malicious participants no overhead in latency or processes lower bounds attained

Modularity precisely defined interface (blackbox) dramatically reduces development time and proofs

Applicable to similar problems non-blocking Atomic Commit in 2 communication steps

Piotr Zieli´ nski

Optimistically Terminating Consensus

Introduction

Consensus Crash Course

Unifying framework

References Francisco Brasileiro, Fab´ıola Greve, Achour Most´efaoui, and Michel Raynal. Consensus in one communication step. Lecture Notes in Computer Science, 2127:42–50, 2001. Miguel Castro and Barbara Liskov. Practical Byzantine fault tolerance. In Proceedings of the Third Symposium on Operating Systems Design and Implementation, pages 173–186, New Orleans, Louisiana, February 1999. USENIX Association. Tushar Deepak Chandra and Sam Toueg. Unreliable failure detectors for reliable distributed systems. Journal of the ACM, 43(2):225–267, 1996. Partha Dutta, Rachid Guerraoui, and Marko Vukolic. Asynchronous Byzantine Consensus: Complexity, resilience and authentication. Technical Report 200479, EPFL, September 2004. Leslie Lamport and Mike Massa. Cheap Paxos. In Proceedings of 2004 International Conference on Dependable Systems and Networks, pages 307–314, Florence, Italy, June 2004. Jean-Philippe Martin and Lorenzo Alvisi. Fast Byzantine Paxos. Technical Report TR-04-07, University of Texas at Austin, Department of Computer Science., 2004. Piotr Zieli´ nski. MinimizingPiotr latency protocols. PhD thesis, Zieli´ nski of agreement Optimistically Terminating Consensus

Optimistically Terminating Consensus - designing ...

Jul 6, 2006 - Introduction. Consensus Crash Course ... termination: all correct processes decide ..... Computer Laboratory, University of Cambridge, 2006.

256KB Sizes 0 Downloads 128 Views

Recommend Documents

Crafting Consensus
Nov 30, 2013 - (9) for small ϵ and ∀i ∈ N. We call these voting functions with minimal ...... The details of the procedure, the Mathematica notebook, are.

Terminating the Department of Homeland Security.pdf
project.25. Full-Body Scanners: TSA spent hundreds of millions of dollars installing. and operating Rapiscan scanners at U.S. airports, but research found that.

Questioning the Consensus
Start (EHS) program study and continued ... ten phase of data collection.19–21 ... experience in EHS communities by. C.L.M. also informed our data analysis.

ECP Consensus Paper.pdf
(8,11Y13,16,27). The Services have recommended training programs that ... endurance training and cardiorespiratory fitness to be mis- sion ready. Whereas ...

Quantized Consensus on Gossip Digraphs
and load balancing in processor networks [8]. ... sip type [3,5,8], which specifies that in each time slot, ... symmetric (or balanced) topologies in random time-.

Distributed Average Consensus Using Probabilistic ...
... applications such as data fusion and distributed coordination require distributed ..... variance, which is a topic of current exploration. Figure 3 shows the ...

Distributed Average Consensus With Dithered ... - IEEE Xplore
computation of averages of the node data over networks with band- width/power constraints or large volumes of data. Distributed averaging algorithms fail to ...

Reaching consensus through simultaneous bargaining
Jul 8, 2015 - strategy profile s is non-consensual. Ties are broken randomly so that, given the strategy profile s = (s1,s2), the expected outcome is b(s1 ⊗s2). The rules described above define the simultaneous Approval Bargaining game. Φ = (S,S,u

5 Meeting Overview - Consensus Building Institute
Measurement and Goal Setting – Emissions goals are aspirational, imperfect, and important. Setting one overarching numerical Cambridge emissions goal is necessarily inaccurate due to inconsistencies in data collection and the fact that some data ca

Paxos Family of Consensus Protocols
Processors with stable storage may re-join the protocol after failures. • Processors ... For instance a “write” request on a file in a distributed file server. Acceptor.

Consensus Recommendations for Gastric Emptying Scintigraphy
Apr 23, 2007 - standardized information about normal and delayed gastric ... solid-meal GES test for clinical practice, using readily available technology and ..... emptying than 2 hour images, e.g., 50% of patients were abnormal at 3-4 .... On the o

Consensus, cohesion and connectivity
Jun 23, 2017 - ity increases the predictive power of social influence theory, shown by re-using experimental data ... sciences—social cohesion (Section 4)—that was defined consider- ing a multiplicity of independent ..... but in actuality there a

Improving convergence rate of distributed consensus through ...
Improving convergence rate of distributed consensus through asymmetric weights.pdf. Improving convergence rate of distributed consensus through asymmetric ...

Improve consensus via decentralized predictive ...
Jun 5, 2009 - Huazhong University of Science and Technology - Wuhan 430074, PRC. 2 ... using local information provided by its neighbors. .... of individual positions, and has not considered the .... N steps, δp,i(k) settles down to a level lower th

5 Meeting Overview - Consensus Building Institute
many different efforts could connect to and build on. ... Update its website to highlight sustainability initiatives and services and best practices for residents and ...

5 Meeting Overview - Consensus Building Institute
many different efforts could connect to and build on. ... Update its website to highlight sustainability initiatives and services and best practices for residents and ...

Accelerated Distributed Average Consensus via ...
Sep 17, 2009 - Networks Laboratory, Department of Electrical and Computer Engineering, .... connected, e.g., maximum-degree and Metropolis weights [12],. [16]. In the next ...... Foundations Computer Science, Palo Alto, CA, Nov. 1998, pp.

Improve consensus via decentralized predictive ...
Jun 5, 2009 - examples of collective behaviors in groups of animals, bacteria, cells and molecular ..... replace them by the following model predictive control.

DISTRIBUTED AVERAGE CONSENSUS WITH ...
“best constant” [1], is to set the neighboring edge weights to a constant ... The suboptimality of the best constant ... The degree of the node i is denoted di. |Ni|.

Supplementary Material: Adaptive Consensus ADMM ...
inequalities together. We conclude. (Bvk+1 − Bvk)T (λk+1 − λk) ≥ 0. (S3). 1.2. Proof of ..... matrix Di ∈ Rni×d with ni samples and d features using a standard ...

Broadcast Gossip Algorithms for Consensus
Jun 17, 2009 - achieved. Finally, we assess and compare the communication cost ... tion of mobile autonomous agents [4], [5], and distributed data fusion in ...

Paxos Family of Consensus Protocols - fractalscape
“For example, it takes seven servers to tolerate three [simultaneous] failures. In many systems, the best way to achieve the desired degree of fault tolerance is to reconfigure the system to replace failed servers by spares. With reconfiguration, a