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.