Option 1: Multi-master replication
Play this lessonThis lesson comes with an interactive animation you can break, a live-code challenge and a chapter quiz.Use the database's auto_increment, but increase by k instead of 1, where k is the number of database servers. Server 1 generates 1, 3, 5…; server 2 generates 2, 4, 6…
The rest of this lesson is part of Pro
Pro unlocks every lesson with its animation, code challenge and quiz, plus every interview problem. ₹299 a month or ₹1,999 a year.
See Pro