Search⌘ K

Issues in Multi Leader Replication

Explore the core challenges of multi-leader replication such as conflicting concurrent writes, data loss risks, and integrity constraints. Understand methods to handle and resolve conflicts, including last write wins, write merging, and advanced automatic conflict resolution using CRDTs. This lesson equips you with the knowledge to manage replication conflicts in distributed database systems.

Some of the problems with multi-leader replication include:

  • Copies of the same data being modified concurrently in different datacenters requiring conflict resolution.

  • Writes being lost from a data center that experiences permanent failure if they haven’t been replicated to other leaders.

  • In case of databases, auto incrementing keys, triggers, and integrity constraints can be problematic to handle.

widget

Handling Conflicts

One of the major problems of multileader replication is conflicting writes. Suppose you are editing a Google document simultaneously with a colleague sitting across the globe. One of you changes the first heading in the document from A to B and the other changes the same heading from A to C respectively. The changes by the two users are committed at the local leader in the nearest data center to each of the users. Unbeknownst to the parties, a conflicting write has been recorded for the document. ...