As I was digging into the change logs for MySQL 5.5 and the replication substructure, I ran into the new features of semi-synchronous replication.
This is implemented in MySQL 5.5 with the master database blocking and not returning the session after writing to the binary log unless a slave (which has also identified itself as running semi-synchronous replication) has acknowledged that it has replicated and committed the changes to it’s own relay log and flushed them to disk.
I suspect there are a lot of caveats.
From the documentation,
While the master is blocking (waiting for acknowledgment from a slave after having performed a commit), it does not return to the session that performed the transaction. When the block ends, the master returns to the session, which then can proceed to execute other statements. At this point, the transaction has committed on the master side, and receipt of its events has been acknowledged by at least one slave.
I’m excited about testing this feature, though I’m ambivalent about the failure mode of dropping immediately (after a timeout) to asynchronous replication.