MySQL 5.7.3 added the rpl_semi_sync_master_wait_for_slave_count option for semisynchronous replication:
The number of slave acknowledgments the master must receive per transaction before proceeding. By default rpl_semi_sync_master_wait_for_slave_count is 1, meaning that semisynchronous replication proceeds after receiving a single slave acknowledgment. Performance is best for small values of this variable.
For example, if rpl_semi_sync_master_wait_for_slave_count is 2, then 2 slaves must acknowledge receipt of the transaction before the timeout period configured by rpl_semi_sync_master_timeout for semisynchronous replication to proceed. If less slaves acknowledge receipt of the transaction during the timeout period, the master reverts to normal replication.
This behavior also depends on rpl_semi_sync_master_wait_no_slave
This variable is available only if the master-side semisynchronous replication plugin is installed.
Can we port this from MySQL?