Group Replication

Group Replication and InnoDB Cluster

Asynchronous replication loses commits the source had not yet sent when it dies, and failover is manual. Semisynchronous replication makes a commit wait for a replica's acknowledgment; Group Replication goes further: a Paxos-based protocol orders every member's transactions, a transaction commits once a majority agrees, certification rejects conflicting writes, and survivors elect a new primary within seconds. It needs InnoDB, a primary key on every table, GTIDs and row logging. A group has at most 9 members, and 3 is the smallest that survives losing one. Single-primary mode, the default, has one writable member.

InnoDB Cluster packages it: MySQL Shell 524 's AdminAPI builds and repairs the group (dba.createCluster('shop'), cluster.addInstance(...), cluster.status()), and MySQL Router 524 , beside PHP-FPM, sends writes to the current primary and reads to the secondaries, so the application does not change during a failover. InnoDB ReplicaSet is the same tooling over asynchronous replication. A cluster needs three hosts and was not built here. For most LAMP sites a source, a replica and tested backups are enough; move to InnoDB Cluster or a managed service (MySQL in the Cloud) when downtime costs more than a third server.