Hello,
I’m looking into using MariaDB & Galera to replace my current setup of MySQL and was
looking for suggestions on how best to set up DR between two datacenters.
The servers are accessed via an app using the internet (already have failover in place for web traffic)
Current set up:
4(2 at each datacenter) MySQL servers (using innodb), setup
in a Master – Slave replication as below:
dc1-master replicates to dc1-slave
dc2-master replicates to dc2-slave
dc1-master replicates to dc2-master
I only write to one master hence why there’s no replication
back between dc1-master & dc2-master
The data centres are in two different geographical locations connected by a 1GB link (used as extension to local network); latency on this connection is around 5-6ms. They also have external internet links (100/1000MB).
So I was wondering what the best set is up to go for, I was
thinking:
One galera cluster containing all 4 servers connected via
the 1GB link which is fine but from what I’ve read if the link was to go down(temporary
loss e.g. 60mins) both parts of the cluster would stop accepting reads and
writes to avoid split brain due to there not been a majority for quorum to use.
I have seen that I could add more servers/weight quorum to
my primary dc (dc1) so then that would have majority but what if dc1 fully goes
down (power failure/total network loss), would dc2 be set to not accept
connections?
Is there a way I could get set up so that if dc1 is fully
down then dc2 will be given majority so it can accept connections automatically
like my web traffic does?
Thanks
Mark
SHOW STATUS LIKE 'wsrep_last_committed'. Choose the node with the highest value.SET GLOBAL wsrep_provider_options='pc.bootstrap=yes' on itHi
I've now moved over to using galera cluster
and finding it very good.
But I'm now investigating arbitrators again
and would like some help regarding if it would work in my situation.
The setup I went for is two nodes in each data
center so four nodes in total, all of the nodes connect via internal (private)
IP's (192.168.0.1, 192.168.0.2, etc) but if I was to use a arbitrator it would
be hosted elsewhere (a third party) so would be connecting to the current cluster via an external IP,
would it work having a mix of internal and external IP's?
Thanks
Mark
Hi Daniel
Thanks for the reply, I'll look at setting the gmcast.segment value.
If my limited understanding of arbitrators is
correct, the arbitrator acts as a listening node (doesn’t store any data) and
is used to help with quorum, so for example if one of the data centers
suffers a full outage, whichever can see the most nodes (themselves +
arbitrator) will carry on as the 'Primary component'.
So in my case, if the 1GB link between the two
data centers go down but both data centers can still see the internet would
they then use the arbitrator as the go between node as it were? And the
cluster would carry on as if nothing had happened to the link?
Thanks
Mark
Thanks
Mark