Last Writer Wins (LWW)
Return to Multi-Master Replication
In the context of multi-master replication, especially as implemented in systems like Cosmos DB, Last Writer Wins (LWW) is a conflict resolution strategy where, among multiple updates to the same data item, the update from the node with the latest timestamp is accepted as the definitive version. This approach simplifies conflict resolution by using timestamps to determine the “winner” of conflicting updates, effectively ensuring that the most recent update prevails. While LWW is straightforward to implement and reduces the overhead associated with more complex conflict resolution mechanisms, it may not always preserve the intentions of all updates, particularly in scenarios where updates are close in time or when the system clocks are not perfectly synchronized. As such, it's favored in applications where eventual consistency is acceptable and the potential loss of intermediate updates does not violate the application's integrity or user expectations.