4 ms·
Why RAFT is better? In other words, why do we need a concept of a leader?
by the_arun 6y ago
Why RAFT is better? In other words, why do we need a concept of a leader?
- b203 6y agoConsistent hashing is a routing algorithm, not a consensus algorithm. https://en.wikipedia.org/wiki/Consistent_hashing https://en.wikipedia.org/wiki/Consistent_hashing
- tick_tock_tick 6y agoBarring some very advanced systems a leader is needed to allow for Serializability https://en.wikipedia.org/wiki/Serializability https://en.wikipedia.org/wiki/Serializability
- MrBuddyCasino 6y ago> Barring some very advanced systems you mean atomic clocks as in spanner?
- tick_tock_tick 6y agoYeah google's True Time system pretty much is the only one I know of. https://cloud.google.com/spanner/docs/true-time-external-consistency https://cloud.google.com/spanner/docs/true-time-external-con...
- deleted 6y ago[deleted]
- b203 6y agoBasically if you want to replicate data across multiple nodes, all of them need to agree on the sequence of data updates. For example if I did [x=6, x=7], then the outcome of those ops is very different if I did it in the opposite order [x=7, x=6]. Easiest way to do this sequencing is to have a unique leader who will impose the unique order. Strict sequencing is not really serializability, but linearizability. For example, Cassandra doesn't by default have the concept of a leader and hence can't provide linearizability. Of course, there is a problem on how you decide who is the leader and what happens if two nodes think they are the leader at the same time. That's where the genius of Multi-Paxos/Raft comes in. You can read more about sequencing here https://medium.com/swlh/replication-and-linearizability-in-distributed-systems-cd9036ea7b40 https://medium.com/swlh/replication-and-linearizability-in-d...