Erlang/OTP Forums

Author Message

<  Trapexit Forums  ~  Creating a mirror for a cluster of nodes

vsp
Posted: Tue Jul 27, 2010 3:45 pm Reply with quote
User Joined: 03 Mar 2010 Posts: 14
Hi,

I have a cluster of Erlang nodes running on a server. Each node hosts a few mnesia tables(some of them are fragmented) which are disc copies. There are various other applications running on each node such as http, logger, inets, etc.
So far so good...

What i am worried about is the situation when one or more nodes go down. To avoid this i am thinking of a design such that each node is replicated/mirrored (with all the application and mnesia tables) at a different host such that everything is in sync ( I don't mind the delay for the mnesia write over network). So for nodes A, B and C on say Machine1, i want to have A1, B1, C1 on Machine2 such that A-A1, B-B1 and C-C1 are in sync all the time.

Any suggestions as in how to achieve this efficiently?

Thanks
Ram
View user's profile Send private message
dudefrommangalore
Posted: Sun Oct 10, 2010 5:02 am Reply with quote
Joined: 25 Dec 2008 Posts: 2
Replicating Mnesia is a very easy task. You can configure Mnesia database/table to replicate it on multiple machines via mnesia:add_table_copy/3 function.

http://www.erlang.org/doc/man/mnesia.html#add_table_copy-3

Solution to you another problem of running a backup node is also solved by Erlang
Smile. Include all your applications you need and create your own application [ http://www.erlang.org/doc/design_principles/included_applications.html ]. Configure the newly created application as a distributed application [http://www.erlang.org/doc/design_principles/distributed_applications.html]. Voila! You have solved the problem with virtually no coding.
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum