简体   繁体   中英

Is eventual Consistency possible in case of Master - Master Configuration -

Is eventual Consistency possible in case of Master - Master Configuration. ie if their are more than one master to accept writes then we can always have conflicting writes in case of eventual consistency.

for example : two master writing two user profile with same email id. In case of an eventual consistent system both masters may be able to successfully commit two user-profile with same email id - which is actual an inconsistent system

One: Locks are taken up before writing to the database or a cache.

Two: If the locks are taken up at the same time then there are further two more ways to resolve.

  • Either an election is made among the two operations and one is elected whereas the other operation is rejected to the client and with it is returned the new value.
  • Or distributed servers allow you to write a conflict resolution code and be deployed at the server, and is executed when this happens.

Usually topologies don't work that way, they distribute writes and there is a master and slave concept in a master master configurations as well. :)

Speaking theoretical of course.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM