Reputation: 11
I have been going through Martin Kleppmann's "Designing Data Intensive Applications" as a resource to understand database replication and its relation to consensus algorithm.
Based on my understanding of consensus, there seems to be a single leader / co-ordinator node which drives consensus across a bunch of replica nodes. Raft and Paxos seem to work like this.
So my question is : How does leaderless replication system work ? Is there actually no single leader / co-ordinator node which orchestrates the agreement / consensus among a bunch of nodes ?
Even if read or write requests are sent to bunch of replica nodes, shouldn't there be an implicit co-ordinator / leader who handles the request ?
I did not find much conclusive material to explain how leaderless replication actually achieves consensus among the replica nodes.
Please correct me if my understanding is wrong, or I am missing something.
Upvotes: 1
Views: 881
Reputation: 1740
My take on the ropic:
So my question is : How does leaderless replication system work ? Is there actually no single leader / co-ordinator node which orchestrates the agreement / consensus among a bunch of nodes ?
I've seen two options:
Dynamo being a good example of leaderless system is defined as B from above.
Another interesting question is what is the difference b/n leaderless and multi-leader? My take on this is based on which nodes "own" the data. E.g. I could have a system with two MariaDB databases, allow writes on both and have a two way replication process where I will resolve conflict by picking a record randomly - this would be multileader system.
Even if read or write requests are sent to bunch of replica nodes, shouldn't there be an implicit co-ordinator / leader who handles the request ?
Often the client itself is the coordinator - they send requests to all replicas, read results, and may even do read-repairs.
Upvotes: 0