MySQL Forums
Forum List  »  Replication

Re: Replication with two servers
Posted by: Jeremy Smyth
Date: April 10, 2013 10:44AM

What you describe is known as "circular replication", and while it is possible, it requires a lot of care; MySQL replication is asynchronous, and therefore is subject to conflicts. It does not perform conflict resolution, so you have to make sure your application caters for that possibility.

The simplest way to succeed with circular replication is to avoid updating the same data (rows and related rows) on different servers and therefore avoid conflicts.

If you do not take care to avoid conflicts, you will eventually encounter a situation where two servers accept conflicting changes at nearly the same time, and replicate them to the other side. This results in the worst-case scenario of two servers containing different data, and no warning of that situation and no idea which version is the true one. I cannot stress too much how bad this situation is, and how important it is to avoid it.

So, in short, what you want to do is possible, but it is not easy to do in the way that you want to while making sure your data is protected.

Options: ReplyQuote


Subject
Views
Written By
Posted
1450
April 10, 2013 09:43AM
Re: Replication with two servers
819
April 10, 2013 10:44AM
830
April 11, 2013 09:01AM
726
April 11, 2013 08:52PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.