- RAFT is a consensus algorithm for distributed systems. It uses naming of Election, Terms, and Leader to model how state is propagated through a distributed system.
- Gossip - not a consensus algorithm explicitly, but a model for how to distribute updates through a system.
In distributed systems literature, we have a concept called CAP theorem, also known as Brewer’s theorem. The argument of the theorem is quite simple:
A distributed system can only offer two out of these three things.
Consistency - Every read receives the most recent write or an error. Availability - Every request receives a (non-error) response, without the guarantee that it contains the most recent write. Partition tolerance - The system is scaled up to multiple partitions, and the system continues to operate despite an arbitrary number of messages being dropped (or delayed) by the network between nodes.
Despite the “two out of three” idea, the third one (partition tolerance) is a defining aspect of a “distributed system”. If it’s not partition tolerant, then it’s not distributed. So, in practice, really it comes down to choosing consistency vs. availability.
Hence, why we hear the term “eventual consistency”. Usually people choose availability for end-user-facing distributed systems.