2

I am just wondering has anyone come accross this before and the best method to go about doing it.

We have a customer that wants multi site replication over a galera cluster.

I am familiar with setting this up but not in the way they are asking for.

First of all the client has a dedicated L2 connection between the datacentres so I have set up the cluster with Private IP addresses going across the dedicated L2 link, the issue is if the L2 link goes down they loose the replication between sites, So I was thinking of natting the nodes private IP addresses to Public IPs.

My question is: Is there a way I can set the galera cluster so that if it can't reach the private IPs it will go out over the internet through the firewall and hit the public IPs?

Could I maybe put the private and public IPs of each site within this setting:

wsrep_cluster_address=gcomm://server1private_IP1, server1public_IP1, server2private_IP1,server2public_ip1 etc

Saying that server1 is local in my datacentre and server2 is in another datacentre.

Or would that write the data twice over the 2 links?

2 Answers 2

0

Maybe you can reach what you want changing gcomm ip addresses to custom non-FQDN hostnames (db1, db2, dbN). Then you can play a little bit with DNS resolution just updating your hosts file on each db node. This is not official nor valuable solution anyway ;)

0

I recommend handling this requirement in the network vice the database configuration. Modern networking gear provide the flexibility to meet a range of requirements in a secure fashion.

I would setup routers on each end to preferentially route traffic over the dedicated link and failover to a route that is tunneled through an encrypted VPN over the internet. Personally, I would also use an encrypted VPN over the dedicated link. Keeping everything in the private IP space reduces the risk of traffic leaking onto the public internet.

I also like @fab23 suggestion to setup a private DNS namespace. That will make it easier to manage.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.