MySQL semi-sync replication: durability consistency and split brains

This post introduces and explains MySQL semi-synchronous replication, detailing its configuration parameters (`rpl_semi_sync_master_wait_for_slave_count`, `rpl_semi_sync_master_timeout`). It elaborates on how semi-sync guarantees durability by persisting changelogs on replicas before acknowledging commits and discusses its implications for consistency, particularly in the context of eventual consistency and avoiding split-brain scenarios. The post analyzes various topologies and failure scenarios, including colocated primaries and replicas, network partitions, and the challenges of determining replica status when multiple semi-sync replicas are lost. It highlights the trade-offs between durability, consistency, availability, and the cost of achieving them.