Reaching Consensus In Distributed Systems

DevOps Meetup
Saulius Grigaitis

Myself

  • Informatics Bachelor (FreeBSD Security)
  • Software Engineering Master (Extreme Programming Software Process Model)
  • Doctoral Student (Blockchain Consensus Algorithms)
     
  • Partnership Associate Professor at MIF VU
  • Blockchain Technologies Course at MIF VU
     
  • 12+ Years Startups Experience @ NECOLT

Consensus

A fundamental problem in distributed computing and multi-agent systems is to achieve overall system reliability in the presence of a number of faulty processes.

Failure Modes

  • Crash stop
  • Crash recovery
  • Omission
  • Byzantine (Arbitrary)

The Byzantine Generals' Problem

Byzantine Failures: Lieutenant Traitor

Byzantine Failures: Commander Traitor

No Solution With Fewer Than 3m+1 Generals for m Traitors

Byzantine Faults

Are Common

FLP Impossibility (1985)

  • In a fully asynchronous message-passing distributed system, in which one process may have a crash failure it is not possible to solve the consensus problem.

     
  • Dijkstra award in 2001

 

FLP: Only Two of The Three

  • Safety - the nodes agree on a valid value that was proposed by one of the nodes.
  • Liveness - the nodes eventually reach agreement 
  • Fault tolerance - the system can survive a failure
 

CAP Theorem: Only Two of The Three

  • Consistency
  • Availability 
  • Partition Tolerance
 

Timing Modes

  • Synchronous model
  • Asynchronous model
  • Semi-synchronous model

Failure Detectors

(Semi-synchronous model)

Leadership Level

Strong Leadership

Leaderless

Raft

Egalitarian Paxos
Proof of Work*

VRR

Fast Paxos

Raft

Proof of Work

Common PoW Problems

  • Probabilistic Finality
  • Centralization
  • Weak Privacy
  • Low Performance
  • High Energy Consumption
 

DevOps
vs.
Science

Distributed Systems Are (Mostly) Faulty

Bugs
vs.
No Proof

 

jepsen.io

GOTO 2018 • Jepsen 9: A Fsyncing Feeling • Kyle Kingsbury
https://www.youtube.com/watch?v=tRc0O9VgzB0

Define Your Needs

Look For Formal Specifications

Do Your Own Verification

( Vendors May Not Know )

Read Scientific Papers

Blockchain Technologies Course at MIF VU

Interested In 

 Blockchain/DLT
?
saulius@necolt.com

Reaching Consensus in Distributed Systems

By saulius

Reaching Consensus in Distributed Systems

  • 129