Clusterization of Mnesia

If I cluster 2 nodes together, from my experiments and reading on the Internet, I understand that Node A will be like a β€œmaster” Node and Node B will copy the tables if I want them, (Otherwise, it will simply access them remotely .)

What happens if Node B drops? Does it just restore data that has been changed since the last time?

Also, if Node A happens. Is it possible to use Node B? If so, if the data is changed to Node B, does Node make a copy for itself? So far, I understand that Node A does not care about what Node B says, but someone will tell me that I am wrong.

+4
source share
2 answers

You might want to read 5.2 Distribution and Resiliency in the Mnesia User Guide

+1
source

Since the accepted answer is an answer only for reference, I would decide to document this for everyone who comes:

  • Mnesia does not quite work, having a master-slave architecture. Instead, some nodes have local copies of the data, and some of them have remote copies. (You can see this by running mnesia:info() from the console. A list of remote tables and a list for each of the local tables: ram_copies , disc_copies and disc_only_copies .)
  • If node goes down while there is a table with a local copy, operations with this table are fine.
  • One side with Mnesia is that it is prone to network partition events. If in your cluster the network connection between the two nodes degrades, then everyone will think that the other node is not working and continues to write data. Recovery from this is complicated. In the more ordinary case, if one of the nodes is omitted, then nodes with local copies of the data continue, and when the down-node is restored, it synchronizes the backup with the cluster.
+1
source

All Articles