2 ms·
In brief: at any point in time, one of the replicas is a "leader" which controls the order in which operations are committed. The changes occur in a defined seq
by teraflop 6y ago
In brief: at any point in time, one of the replicas is a "leader" which controls the order in which operations are committed. The changes occur in a defined sequence, and other replicas may lag behind the leader, but cannot be inconsistent with it.
Your example can't happen, because if (for instance) A is the leader, then C will not apply change Y without contacting the leader, which will tell it to apply X first.
If you want more details about how this handles all the edge cases -- for instance, what happens if the leader crashes -- the Raft paper is quite accessible: https://raft.github.io/raft.pdf https://raft.github.io/raft.pdf
- hinkley 6y agoTL;DR: Raft updates are serialized (as in sequential).