I’m trying to set up a single cluster spread in two datacenter, US and EU, and right now this is what I have:
EU:
mysql-eu01
US:
mysql-us01
mysql-us02
I have defined 2 regions using wsrep_provider_options=“gmcast.segment=1” for EU and wsrep_provider_options=“gmcast.segment=2” for US.
I have a big question I can’t quite figure out: I want all the servers to behave like masters (writes synchronize to all other servers).
Do I need all servers to be able to connect directly to each other (ports 3306, 4444, 4567 and 4568)? Or can I get away with using wsrep_sst_donor? In this particular example, do I need to give mysql-eu01 access to mysql-us02?
mysql-eu01:
[mysqld]
...
server_id=1
wsrep_cluster_address=gcomm://mysql-eu01,mysql-us01,mysql-us02
wsrep_node_address=mysql-eu01
wsrep_provider_options="gmcast.segment=1"
wsrep_node_incoming_address=mysql-eu01
wsrep_sst_donor=mysql-us01
...
mysql-us01:
[mysqld]
...
server_id=3
wsrep_cluster_address=gcomm://mysql-eu01,mysql-us01,mysql-us02
wsrep_node_address=mysql-us01
wsrep_provider_options="gmcast.segment=2"
wsrep_node_incoming_address=mysql-us01
wsrep_sst_donor=mysql-eu01
...
mysql-us02:
[mysqld]
...
server_id=4
wsrep_cluster_address=gcomm://mysql-eu01,mysql-us01,mysql-us02
wsrep_node_address=mysql-us02
wsrep_provider_options="gmcast.segment=2"
wsrep_node_incoming_address=mysql-us02
wsrep_sst_donor=mysql-us01
...
All servers are behind firewalls with no external IP, and I would have to map each one of them. I plan on adding more servers to the equation, so I would prefer to no have to map ports for each one of them.