TLDR: Multi-Master Conflicts - How to Handle Them
Date: 2022-01-03 Source: https://arpitbhayani.me/blogs/conflict-resolution
Overview
Explore conflict resolution strategies in multi-master databases. Learn to handle conflicts with unique IDs, database precedence, & custom logic. Every multi-master replication setup comes with a side-effect - Conflicts.
Key Points
- Every multi-master replication setup comes with a side-effect - Conflicts.
- Globally unique ID to transaction: One possible way to determine the order of the write operations spanning multiple masters is to assign globally unique monotonically increasing IDs to each write operation.
- Precedence of a database: Given that managing an ID generator at scale could be taxing, another possible solution is to assign the order to the master nodes.
- Track and Resolve: If, for a use case, it is not possible to resolve the conflicts at the database level, then the best approach in such a scenario is to record the conflict in a data structure designed to preserve all the information.