Mariadb – Galera, MariaDB and multiple datacenter

galeramariadb

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

Best Answer

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.