recently, I have been learning distributed architecture. I have basically figured it out. What about the database?
the mysql, I"ve been using take mysql as an example
for example, I now have two databases of server B. According to the load balancer, server may write to An or B
the question is mainly how the database is Synchronize. I know that mysql has a master-slave database Synchronize function, but what about that timeliness? For example, a client inserts a piece of data into database A, and then the client is disconnected and reconnected, and then he redoes the operation, just this time he inserts it into database B. at this time, Amai B and the two databases haven"t had time for Synchronize, isn"t there two pieces of duplicate data?
I would like to ask the experienced warrior to tell me how the usual situation in this area is going on. Or is the architecture I"m talking about wrong, usually using other methods rather than multiple databases to share the load?