setting up distributed environment
Serge Aleynikov
serge@REDACTED
Wed Aug 30 15:30:20 CEST 2006
It's a bit unclear what do you mean by a 'master' node. Mnesia doesn't
have a notion of a master or slave. Any node that has a replicated
table can have local writes to that table that will be propagated to
other replicas. The level of control that mnesia gives you is what
nodes host disk/ram copies of a table.
In your application you could have two nodes running on two separate
hosts with tables created using 'disc_copies' option. The mnesia
application would need to be started with the 'extra_db_nodes' option
containing these two nodes ['app@REDACTED', 'app@REDACTED']. The remaining
nodes could have mnesia started with the same 'extra_db_nodes' option,
and have these tables replicated as ram_copies if needed. This option
would be applicable if you needed to provide quick local access to
tables by some other node 'x@REDACTED'.
You should be concerned with the fact that the more nodes you have a
table replicated to, the longer each transactional write to such a table
will take, and also the more sensitive your overall solution will be to
intermittent network outages.
Regards,
Serge
Igor Goryachev wrote:
> Hello everyone.
>
> I am going to setup erlangish application. My purpose is to make it
> fault-tolerant by replicating it's mnesia over several nodes. Still I
> have some doubts concerned with setting master nodes.
>
> I will have two machines for the first time (lets consider 'app@REDACTED'
> and 'app@REDACTED'). Am I right I am going to make 'app@REDACTED' master node
> of 'app@REDACTED' and vice versa. Any thoughts? Well, and what about when
> number of nodes more that two?
>
> Thank you veru much for the attention.
More information about the erlang-questions
mailing list