Synchronous replication for MySQL is here, well almost here. Solid has announced a product that will be available in 2007 to provide this. I anxiously await the details. And now, source code is available for an implementation of semi-synchronous replication that works with MySQL 4.0.26 and InnoDB. The implementation is reasonably generic and can work with other storage engines.
What is semi-synchronous replication?
You can attend this talk to find out. Semi-sync replication blocks return from commit on a master until at least one slave has acknowledged receipt of all replication events for that transaction. It was relatively easy to extend MySQL to support this, and the changes are well isolated. Semi-sync replication also co-exists with the current replication (async) code in MySQL. Some slaves can use semi-sync while other slaves use async.
Why is semi-sync replication important?
MySQL replication is asynchronous. When a master fails, the most recent transactions can be lost because they might not have been copied to a slave. MySQL Cluster make this type of loss much less likely, but some applications work best with InnoDB. Semi-sync replication decreases the chance that transactions are lost when a master fails.
Monday, April 23, 2007
Subscribe to:
Post Comments (Atom)


Interest issue. I have a question.
ReplyDeleteWhen a slave with semi-synchronous replication failed, will the master server deny all commit after the slave failure?
I attended this talk, but I cannot remember anything of it. (It was a long 4 days.)
ReplyDeleteCan you please post the slides?
The semi-sync feature has a configurable timeout. Return from commit on a master is blocked until at least one slave acknowledges all replication events or until the timeout is exceeded. If all semi-sync slaves die, each commit on a master blocks until the timeout is reached.
ReplyDeleteI guess my talk wasn't unforgettable. Your best place for details are the notes that other have taken and posted on blogs.
ReplyDelete