MariaDB & Galera, what happens if a cluster node is lost?

2

I'm following this tutorial to mount a cluster with MariaDB yy Galera.

My question is, if for whatever reason (the machine is turned off, it is removed from the network, etc ..) node 1 is affected, the rest of the nodes continue to maintain the replication of the databases?

    
asked by Oskar Calvo 28.11.2018 в 12:42
source

1 answer

3

I comment the following points about the implementation of MariaDB / MySQL / Percona with Galera to clarify doubts:

  • Each node has a full copy of all the data.
  • It is recommended at least in a cluster the availability of 3 nodes to avoid the split brain . There should always be 50% + 1 of quorum. This is why it must be an odd number of nodes; 3, 5, 7, 9 ...
  • It may be the case of having two nodes forming the cluster, a situation that does not meet the minimum defined in the previous point, then you must use Galera Arbitrator to avoid the Split Brain as long as you are writing on both nodes.
  • In case a node stops working, the cluster keeps working, it is transparent. For this to be accomplished you must add a service such as a (HAProxy, ProxySQL / Service Discovery) to automatically discard the affected or donor node and new.
  • Each node is replicated with the number of available nodes. This implies an increase of the bandwidth consumed by the NIC, and an additional cost in the Cores of the CPU to dedicate this process of replication, depending on the high traffic one of these two resources can be saturated.
  • When a node is added, one of the ones that already make up the cluster happens to be a donor, and will not provide service until all the data has been transferred to the new node and synchronized with the cluster, until then none of the two will be available.
answered by 29.11.2018 / 15:34
source