Galera cluster with mixed public/private IP addresses

956 views
Skip to first unread message

Benji Fisher

unread,
Apr 17, 2014, 5:35:55 PM4/17/14
to codersh...@googlegroups.com
I have set up a test cluster with three nodes.  The tricky part is that two (node1 and node2)  are part of the same local network and recognize each other using internal IP addresses (10.*.*.*).  They cannot use each other's public IP address, which is the only way the third node (node3) can connect to them.

I got it to work by starting the cluster with node1 and node3.  Both used their public IP's in wsrep_node_address.  I added node2 to the cluster with this configuration:

wsrep_sst_donor="node1"
wsrep_node_address="10.1.2.3"
wsrep_sst_method=rsync

(That is not the actual IP address, but I used the internal one.)  This seems to work, but I wonder if this configuration will cause problems later; is there a better way?

It looks as though node2 starts an rsync daemon, then tells node1 (the donor) to connect at the IP address specified in wsrep_node_address, which is why I tried this.  Is wsrep_node_address used for anything else, and will it be a problem that node3 cannot use this IP address?

I am using galera 25.3.2 and mysql-server-wsrep 5.5.34-25.9 on Ubuntu 12.04.

dirtysalt

unread,
Apr 18, 2014, 5:05:33 AM4/18/14
to codersh...@googlegroups.com
I think wsrep_node_address is a kind of important parameter. Here is the description of this parameter
Basically galera use this parameter to
1. communicate with other nodes
2. perform state transfer and reception

If node3 and node2 are not connected, I'm not sure what specific problem will happen. But I think it's better to make them all connected.

Benji Fisher

unread,
Apr 18, 2014, 5:22:44 PM4/18/14
to codersh...@googlegroups.com
Thanks.  I already read that.  I also read this bit of documentation, which does not seem to have made it to the new site:  https://web.archive.org/web/20130923180812/http://www.codership.com/wiki/doku.php?id=mysql_galera_configuration .  Before I got that hint, I could not get the two remote nodes to form a cluster.

I am currently trying using server names "galera1", "galera2", "galera3", for wsrep_node_address, and defining these in /etc/hosts on each server.  It seems to work, but I wonder if there is a better way.
Reply all
Reply to author
Forward
0 new messages