2

Looking into using Galera and MariaDB across 3 data centers. We have a metroE comnection between the sites. Connectivity is pretty stable, but my concern is if a WAN link goes down at one of the sites, and I am writing to the local nodes.

How does it handle that situation?

How many nodes at minimum at each site is recommended?

This question was similar, but different: https://stackoverflow.com/questions/27777134/galera-cluster-replication-between-two-data-centers/27793927#27793927

1 Answer 1

1

If the WAN link breaks, the cluster will split into 2 clusters. The bigger cluster will be a PRIMARY cluster, meaning that it will work properly. The other partition won't accept any write until it re-joins with the PRIMARY cluster and the data in the nodes are updated.

Note that it is very important to set a good value for evs.suspect_timeout. Before this timeout occurs, the whole cluster will wait a response from unreachable node. After that timeout occurs, the cluster is partitioned. If the value is too low, slow nodes may cause a cluster partitioning. If the timeout is too high, working nodes may wait uselessly for a response from unreachable nodes.

2
  • How does the smaller cluster know it is the smaller cluster? Commented Sep 2, 2016 at 9:15
  • 2
    If cluster_size > all_nodes / 2, it is a PRIMARY cluster. If not, it isn't. That's the reason why you should never have a 2 nodes cluster: if one crashes, the other one cannot be PRIMARY. Commented Sep 3, 2016 at 16:46

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.