MySQL & InnoDB (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)
MySQL Replication: Asynchronous vs Semi-Synchronous vs Group Replication.
senior LevelAsync & PromisesDatabases & SQLMySQL
In Simple Words:
- Asynchronous Replication (Default): Primary commits transactions and writes to binlog without waiting for replicas. High throughput, but risk of data loss if Primary fails before binlog ships.
- Semi-Synchronous Replication: Primary commits only after at least one replica confirms receiving and persisting the event to its Relay Log. Zero data loss for committed transactions.
- Group Replication (MGR / InnoDB Cluster): Multi-master / Single-master synchronous replication using the Paxos consensus algorithm with automated failover and network split-brain protection.