I am configuring MySQL Group Replication in multi-primary mode to replicate all databases between two members and allowing writes on either.
I have my two members IP addresses configured in the whitelist and seed list:
loose-group_replication_ip_whitelist = "x.x.x.x,y.y.y.y."
loose-group_replication_group_seeds = "x.x.x.x:33061,y.y.y.y:33061"
My understanding is that if in a month or two I want add a third member, I will need to update both member's my.cnf files to add the third member to the whitelist and seed list. I will then need to restart the mysql services in order for the change to take effect. What is the best practice here? I see two options:
Option 1: restart the members one at a time such that the group never becomes empty.
- Restart mysql on member1
- Re-join the group with START GROUP_REPLICATION;
- Restart mysql on member2
- Re-join the group with START GROUP_REPLICATION;
- Start mysql on member3 with START GROUP_REPLICATION;
Option2: stop all members and rebootstrap
- Stop mysql on both existing members
- Bootstrap the group on member1
- Join the group on member2 and member3
Option 1 should result in no downtime whereas Option 2 would have downtime. Are there any other options I'm missing or is Option 1 best practice?