[erlang-questions] Mnesia table replication scheme

Khitai Pang khitai.pang@REDACTED
Tue Mar 1 18:46:23 CET 2016


Hi,

I'm storing user accounts and organizations (a tree of users, i.e. 
departments, sub-departments, etc) in mnesia tables.  Modification to 
the data is not very frequent, i.e. not as frequent as a message queue.  
I can't afford losing the data.  Assume I have 9 erlang nodes (Linux VMs 
in a clound), and I haven't decided how many of them should be used for 
handling client connections and how many should be used for data 
storage/backup.

I know that the more nodes a table is replicated on, the slower writing 
to it will be; I also know that ram copies are faster than disk copies; 
I am seeking to find a balance between performance and data safety.  How 
should the tables be replicated?  Should I use ram copies or disk copies 
or a hybrid scheme?  Can the data be in ram copies on some nodes and 
backed up in disk only copies on some other nodes?  If this is possible, 
will it provide performance as ram copies while still have data safety 
like disk copies?

What is the best practice here?


Thanks
Khitai



More information about the erlang-questions mailing list