A few tricks that might help are:<br><br>- The OTP environment variable -kernel dist_auto_connect once<br> It makes sure that nodes can only connect automatically once;<br> if the connection is lost, one of the nodes must restart, or the
<br> connection must be established manually. This way one has time<br> to diagnose the situation and take appropriate action.<br><br>- The global name server has a 'deconflict method'. The normal <br> action if it finds conflicting registrations when reconnecting with
<br> another node, is to pick one of the registered processes at random,<br> and then kill it. Another option is to unregister all instances of <br> the given name. A third option is to provide your own function<br> to resolve the conflict.
<br><br>Gen_leader is also designed to handle split brain. It has also been <br>verified to work using a battery of model checking, QuickCheck, etc.<br><br>BR,<br>Ulf W<br><br><div><span class="gmail_quote">2007/4/27, Tom Samplonius <
<a href="mailto:tom@samplonius.org">tom@samplonius.org</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br> How do you deal with split brain issues in distributed Erlang? In my case, I would like a single process that is running on a node, processing messages. If the node fails, start the process elsewhere. But if the "node" fails, is it down, or just unreachable? I don't want it be possible for be two nodes to be working on the same request. I assume that using 3+ nodes and a quorum type system is the standard solution? Is there a library for managing this?
<br><br> Basically, if a node detects it is not part of the quorum (can't see a majority of the nodes), it should stop doing anything, until it can rejoin. And if the quorom master notices that a node has disappeared that was doing some sort of monitored process, it should restart that process on another node.
<br><br>Tom<br>_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br><a href="http://www.erlang.org/mailman/listinfo/erlang-questions">
http://www.erlang.org/mailman/listinfo/erlang-questions</a><br></blockquote></div><br>