What Is Multi-Leader Replication in Databases?
How Databases Handle Writes From Around the World!
Most databases keep one main copy that handles every write. That works until your users are spread across the world. Someone in Sydney writing to a database in Virginia waits on a slow round trip, and if Virginia goes offline, nobody can write at all.
Multi-leader replication solves this by putting a leader in each region. Each one takes writes from the users nearest to it and shares the changes with the rest. The tricky part shows up when two people edit the same row at the same time in different regions. Both leaders say yes, and now there are two answers for one value. Most systems keep whichever write has the later timestamp and quietly drop the other.
So whose write should survive, the older one or the newer one? Tell us in the comments.
#Databases #MultiLeaderReplication #DistributedSystems #SystemDesign #BackendEngineering #DevOps #DataEngineering #SoftwareEngineering #TechExplained #KodeKloud
KodeKloud
...