You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Message Passing is invoking behavior on a separate process (not necessarily on the same computer) by sending messages.
33
+
: * Message Passing
34
+
: Message Passing is invoking behavior on a separate process (not necessarily on the same computer) by sending messages.
35
35
36
-
Models for exchanging messages:
36
+
: Models for exchanging messages:
37
37
38
-
- point to point (symmetric/asymmetric, synchronous/asynchronous)
39
-
- remote procedure calls (RPC, RMI)
40
-
- broadcasting and multicasting
38
+
: - point to point (symmetric/asymmetric, synchronous/asynchronous)
39
+
: - remote procedure calls (RPC, RMI)
40
+
: - broadcasting and multicasting
41
41
42
42
: Sender schickt Nachricht an Empfänger
43
43
: symmetrisch: beide kennen sich / asymmetrisch: nur ein eine Richtung
44
44
: synchron: blockiert bis Nachricht gelesen
45
45
: RPI: wie lokaler Prozeduraufruf
46
46
47
+
* The two general problem
48
+
49
+
.image ./img/08-two-generals-problem.png 400 _
50
+
51
+
- The two generals problem is a thought experiment in distributed computing and unsolvable when the communication might fail.
52
+
- We need a pragmatic solution.
53
+
47
54
* What is Distributed Consensus?
48
-
Distributed consensus is the problem how to achieve consistency in distributed systems. Distributed consensus protocols can be used for distributed databases which should stay consistent:
55
+
56
+
The consensus problem requires agreement among a number of processes on a single data value.
57
+
Distributed consensus protocols can be used for distributed databases which should stay consistent:
49
58
50
59
- The system stays consistent even if some nodes goes down
51
60
- The system stays consistent if a network partition occurs (but could get unavailable)
@@ -61,15 +70,15 @@ In a distributed system the following requirements can be met:
61
70
Pick Two: Only two requirements can be met -> CP, AP are typical (CA does not exists)
- All known algorithms use the concept of a quorum to detect network partition problems
70
78
- Only the partition with the majority of nodes stay alive to ensure consistency
71
79
- All known algorithms use the concept of a Master or Leader node to control replication
72
-
- All known algorithms use a replicated log and implement a two phase commit
80
+
- All known algorithms use a replicated log and implement a two phase commit.
81
+
- A replicated log is a list of all changes which are applied to the system
73
82
74
83
: Consistency & Partition Tolerance
75
84
@@ -91,7 +100,6 @@ Phases:
91
100
.link https://github.com/lshmouse/reading-papers/blob/master/distributed-system/Zab:%20High-performance%20broadcast%20for%0Aprimary-backup%20systems.pdf The ZAB paper
92
101
.link https://lamport.azurewebsites.net/pubs/lamport-paxos.pdf The Paxos Paper
93
102
94
-
95
103
* Who uses Raft?
96
104
- ectd - The Cloud Native key value store -> Part of Kubernetes!
97
105
- Docker Swarm - Docker in cluster mode
@@ -133,42 +141,21 @@ Other implementations
133
141
* Is it possible to build your own Raft implementation?
134
142
Requirements and Decisions
135
143
136
-
- We want to stay as close a possible on the original specification
137
-
- We want to make a Raft cluster local testable (as single process)
0 commit comments