Replication and Group Replication
Harry
· 13 Sep 2026
· 2 views
How Replication Works
The source server writes every change to its binary log. Replica nodes read that log over the network and replay the events into their own data files.
Setting a Replica
CHANGE REPLICATION SOURCE TO
SOURCE_HOST='primary.internal',
SOURCE_USER='repl',
SOURCE_AUTO_POSITION=1;
START REPLICA;Checking Lag
SHOW REPLICA STATUS;Watch Seconds_Behind_Source. Sustained lag usually means the replica cannot keep up with the write rate, or long queries are blocking log replay.
Group Replication
Group replication keeps several nodes in sync using distributed consensus. Any node can accept writes, and conflicts are certified automatically, bringing built-in failover.
Key Points
- The binary log feeds replicas.
- CHANGE REPLICATION SOURCE configures a replica.
- Monitor Seconds_Behind_Source for lag.
- Group replication adds automatic failover and multi-writer support.