This text discusses the consensus problem in unreliable distributed systems, highlighting key failure types: link failures, processor crashes, and Byzantine failures. It examines how these failures impede the ability of distributed processors to reach consensus on a value. The challenges posed by unreliable links are illustrated through the classic "two generals problem," revealing the impossibility of simultaneous consensus under such conditions. The document further explores the requirements for consensus, such as termination, agreement, and validity, alongside algorithmic approaches to achieve fault-tolerant consensus in asynchronous systems.
01 / 119Understanding Consensus Problems in Unreliable Distributed Systems
1 / 17
Télécharger la présentation
Understanding Consensus Problems in Unreliable Distributed Systems
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation
Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement.Téléchargez la présentation en cliquant sur ce lien.Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.
F I N
Plus de contenu associé
Transcription de la présentation
SECOND PART: Algorithms for UNRELIABLE Distributed Systems (The consensus problem)
Failures in Distributed Systems • Link failure: A link fails and remains inactive; the network may get disconnected • Processor Crash: At some point, a processor stops taking steps • Byzantine processor: processor changes state arbitrarily and sends messages with arbitrary content (name dates back to untrustable Byzantine Generals of Byzantine Empire, IV–XV century A.D.)
Byzantine Failures a Faulty processor a *!§ç# *!§ç# %&/£ %&/£ Processor sends arbitrary messages, plus some messages may be not sent
Round 1 Round 2 Round 3 Round 4 Round 5 Round 6 Failure Failure After failure the processor may continue functioning in the network
Consensus Problem • Every processor has an input x є X • Termination: Eventually every non-faulty processor must decide on a value y. • Agreement: All decisions by non-faulty processors must be the same. • Validity: If all inputs are the same, then the decision of a non-faulty processor must equal the common input (this avoids trivial solutions).
Agreement Start Finish 0 2 1 3 3 3 3 3 2 3 Everybody has an initial value All non-faulty must decide the same value
Validity If everybody starts with the same value, then non-faulty must decide that value Finish Start 1 2 1 1 1 1 1 1 1 1
Negative result for link failures • It isimpossible to reach consensus in case of link failures, even in the synchronous case, and even if one only wants to tolerate a single link failure.
Consensus under link failures:the 2 generals problem • There are two generals of the same army who have encamped a short distance apart. • • Their objective is to capture a hill, which is possible only if they attack simultaneously. • • If only one general attacks, he will be defeated. • • The two generals can only communicate by sending messengers, which is not reliable. • • Is it possible for them to attack simultaneously?
Impossibility of consensus under link failures • First of all, notice that it is needed to exchange messages to reach consensus (generals might have different opinions in mind!) • Assume the problem can be solved, and let Π be the shortest (i.e., with minimum number of messages) protocol for a given input configuration. • Suppose now that the last message in Π does not reach the destination. Since Π is correct, consensus must be reached in any case. This means, the last message was useless, and then Π could not be shortest!
1 1 1 1 1 1 1 1 1 1 This algorithm satisfies the validity condition Finish Start If everybody starts with the same initial value, everybody decides on that value (minimum)
Consensus with Crash Failures The simple algorithm doesn’t work Each processor: • Broadcast value to all processors • Decide on the minimum
Start fail 0 0 1 0 4 3 2 The failed processor doesn’t broadcast its value to all processors
An f-resilient algorithm Round 1: Broadcast my value Round 2 to round f+1: Broadcast any new received values End of round f+1: Decide on the minimum value received
Example: f=2 failures, f+1 = 3 rounds needed Round 2 0 Failure 1 0,1,2,3,4 0,1,2,3,4 1 4 0,1,2,3,4 0,1,2,3,4 3 2 Broadcast new values to everybody Remark: At the end of this round all processes know about all the other values
Example: f=2 failures, f+1 = 3 rounds needed Round 3 0 Failure 1 0,1,2,3,4 0,1,2,3,4 1 4 0,1,2,3,4 0,1,2,3,4 3 2 Failure 2 Broadcast new values to everybody (no new values are learned in this round)
In the algorithm, at the end of the round with no failure: • Every (non-faulty) processor knows • about all the values of all other • participating processors • This knowledge doesn’t change until • the end of the algorithm
Therefore, at the end of the round with no failure: everybody would decide the same value However, we don’t know the exact position of this round, so we have to let the algorithm execute for f+1 rounds
Connexion au compte
Connectez-vous pour publier votre contenu sur SlideServe.