Leaderless Replication
We'll cover the following
So far we have discussed leader-based replication but there also exists another strategy without any nodes in the system acting as leaders. Some of the databases that use leaderless replication include:
Amazon Dynamo DB
Riak
Voldemort
Cassandra
The idea powering leaderless replication is to always write or read from a majority (more than half) of the number of nodes in the system. This practice ensures that when a client reads a value from a node, at least one of the nodes in the system has the latest value and vice versa for writes, i.e. the latest value is written to at least one of the nodes in the system.
Note that when making read/write requests either the client can send requests to the desired number of replicas or a coordinator node can be responsible for forwarding client requests to the replicas.
Example
Let’s consider a concrete example of a system with three replicas labelled as A, B and C as shown below:
Get hands-on with 1400+ tech skills courses.