MariaDB – Galera Cluster Stops Working Without Network Connectivity

galeramariadbNetwork

I am running MariaDB Galera cluster whose using mariaDB and 3 nodes(node A, node B, node C). My nodes are placed locally in our office.

My problem is if node A/B/C lost network connection, it also lost it's working ability.

Say a application is connected to node A, then node A lost network connectivity, so when someone tries to read/write data on node A using physical access,say CLI, it doesn't work. It's showing,
ERROR 1047 WSREP has not yet prepared node for application use

I want to use node A/B/C offline as well. When they get back the network connection, it will automatically replicate offline data to the connected nodes.

Thanks in advance,

Nixon

Best Answer

Galera can't do that, unfortunately, although you can configure it to handle shorter network outages. (See Galera's config tips for WAN replication.) Nodes have to be connected for Galera's global ordering to work so that it can merge writes from multiple nodes. See e.g. here

Maybe what your application could do instead if a node loses network and becomes unavailable (which could be detected by the application or a DB proxy) is to automatically fail over to a different cluster node. However, that still requires network connectivity to this other node.

So if your architecture needs to be tolerant against network losses between nodes, then you may have to look for a different solution.