Asynchronous ConsensusOutline of talkDistributed Computing ModelsAsynchronous network modelAn asynchronous networkSlide 6Slide 7Justification?ParadigmsConsensus problemSlide 11Fault-toleranceIf some process stays up…If one process stays upAlgorithmAnother algorithmFLP resultBasic ideaSlide 19Transitions between configurationsBasic LemmaSlide 22Main resultBasic FLP theoremSlide 25Single step decidesSlide 27Notes on FLPFLP intuitionKey insightFLP and our first algorithmFLP in the real worldChandra/TouegChandra/Toueg IdeaSample propertiesSlide 36A sampling of failure detectorsPerfect Detector?Example of a failure detectorW: Weakest failure detectorRotating a token versus 2-phase commitSlide 42Set of problems solvable in:Building systems with WWould we want to?French ATC system (simplified)Potential applicationsBroad conclusions?Value of FLP/ConsensusNature of debateAsynchronous ConsensusKen BirmanOutline of talkReminder about modelsAsynchronous consensus: Impossibility resultSolution to the problemWith an “oracle” that detects failuresWithout oracles, using timeoutBig issues? Revisit from Byzantine agreementIs this model realistic? In what ways is it “legitimate”?Should we focus on impossibility, or “possibility”?Asynchronous consensus in real world systemsDistributed Computing ModelsRecall that we had two modelsTo reason about networks and applications we need to be precise about the setting in which our protocols runBut “real world” networks are very complexThey can drop packets, or reorder themIntruders might be able to intercept and modify dataTiming is totally unpredictableAsynchronous network modelAsynchronous because we lack clocks:Network can arbitrarily delay a messageBut we assume that messages are sequenced and retransmitted (arbitrary numbers of times), so they eventually get through.“Free” to say: lossless, orderedNo value to assumptions about process speedFailures in asynchronous model?Usually, limited to process “crash” faultsIf detectable, we call this “fail-stop” – but how to detect?An asynchronous networkNot causal!An asynchronous networkTime shrinks…An asynchronous networkTime shrinks…Time stretches…Justification?If we can do something in the asynchronous model, we can probably do it even better in a real networkClocks, a-priori knowledge can only help…But today we will focus on an impossibility resultBy definition, impossibility in this model means “xxx can’t always be done”ParadigmsFundamental problems, the solution of which yields general insight into a broad class of questionsIn distributed systems:Agreement (on value proposed by a leader)Consensus (everyone proposes a value… pick one)Electing a leaderAtomic broadcast/multicast (send a message, reliably, to everyone who isn’t faulty, such that concurrent messages are delivered in the same order everywhere)Deadlock detection, clock or process synchronization, taking a snapshot (“picture”) of the system state….Consensus problemModels distributed agreementComes in various forms (with subtle differences in the associated results)!With a leader: leader gives an order, like “attack”, and non-faulty participants either attack or do nothing, despite some limited number of failures: Byzantine AgreementWithout a leader: participants have an initial vote; protocol runs and eventually all non-faulty participants chose the same outcome, and it is one of the initial votes (typically, 0 or 1): Fault-tolerant ConsensusConsensus problemP0Q0R1P1Q1R1Fault-toleranceGoal: an algorithm tolerant of one failureFailure: process crashes but this is not detectableSo the algorithm must work both in the face of arbitrary message delay caused by the network, and in the event of a single failureIf some process stays up…Suppose we knew that P won’t failThen P could simply broadcast it’s inputAll would “decide” upon this valueSolves the problemIf one process stays upIndeed, suppose that P stays up only long enough to send one messageBut there is only one failureAnd we knew that P would “lead”Then we can relay P’s message, using an all-to-all broadcastAlgorithmP: broadcast my inputQ P: on receiving P’s message for first time, broadcast a copyTolerates anything except failure of P in the first step, but we need to agree upon “P” before starting (ie P is the least ranked process, using alphabetic ranking)Another algorithmAll processes start by broadcasting own value to all other processesIf we know that there is always exactly one failure, could wait until n-1 messages received, then using any deterministic ruleBut doesn’t work if sometimes we have one failure, sometimes noneFLP resultConsiders general caseAssumes an algorithm that can decide with zero or one failuresProves that this algorithm can be prevented from reaching decision, indefinitelyBasic ideaThink of system state as a “configuration”Configuration is v-valent if decision to pick v has become inevitable: all runs lead to vIf not 0-valent or 1-valent, configuration is bivalentInitial configuration includesAt least one 0-valent: {0,0,0….0}At least one 1-valent: {1,1,1…..1}At least one bivalent: {0,0,…1,1}Basic idea0-valentconfigurations1-valentconfigurationsbi-valentconfigurationsTransitions between configurationsConfiguration is a set of processes and messagesApplying a message to a process changes its state, hence it moves us to a new configurationBecause the system is asynchronous, can’t predict which of a set of concurrent messages will be delivered “next”But because processes only communicate by messages, this is unimportantBasic LemmaSuppose that from some configuration C, the schedules 1, 2 lead to configurations C1 and C2, respectively.If the sets of processes taking actions in 1 and 2, respectively, are disjoint than 2 can be applied to C1 and 1 to C2, and both lead to the same configuration C3Basic Lemma2C1C3CC2211Main resultNo consensus protocol is totally correct in spite of one faultNote: Uses total in formal sense (guarantee of termination)Basic FLP theoremSuppose we are in a bivalent configuration now and later will enter a univalent configurationWe can draw a form of frontier, such that a single message to
View Full Document