|
|
| Author |
Message |
< Trapexit Forums ~ Creating a mirror for a cluster of nodes |
| vsp |
Posted: Tue Jul 27, 2010 3:45 pm |
|
|
|
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 |
|
|
| Back to top |
|
| dudefrommangalore |
Posted: Sun Oct 10, 2010 5:02 am |
|
|
|
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
. 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. |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
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
|
|
|