Wednesday, November 12, 2008

circular replication - Will you use it?


MySQL Circular replication
Three unrelated facts reminded me of a popular article about MySQL replication that I wrote long time ago.
  • A reader of that article told me that he used information I wrote to set up a circular replication in production, and it is still working!
  • A new page on circular replication in MySQL manual was just published.
  • During yesterday's meetup in New York, an attendee asked advice about broken replication in a circular scheme, and I suggested reading all the caveats that I listed in my article.

I recall reading in High Performance MySQL 2nd edition that circular replication is not recommended, and I agree on the reasons. I wrote that article as it was the result of my research, but I don't recommend circular replication either.
All of the above lead to the questions:
  • Who is using circular replication in production?
  • Who prefers circular replication to more robust methods, and why?

3 comments:

arjen said...

Well, one of the main reasons to not use it is the messy situation to work through when a server drops out... sorting out the binlog offsets.
However, with the Google mirrored binlog patch (http://ourdelta.org/docs/mirror-binlog) that becomes a moot point.

So, perhaps that patch makes this kind of setup viable again.

Eric Bergen said...

That something is still working doesn't mean much. It's more important to know if it can survive and recover from a partial failure. Circular replication really can't and it's only a matter of time before that attendee realizes it.

مُصْعَب إِبْرَاهِيم said...

I don't think circular replication is apropriate for a production site, however i may use it at my small home network for backup reasons, not on a heavy loaded web based application.