2
votes

To my understanding, if you have two different erlang clusters, each of them using a different Erlang cookie, a node belonging to the first cluster will not be able to communicate with a node belonging to the second cluster.

Does Erlang provide a mechanism to allow multiple magic cookies for a given node?

1
It's not completely impossible to join two such clusters. You can use erlang:set_cookie/2 to set a separate cookie for each remote node. - legoscia

1 Answers

3
votes

As explained here and as mentioned by @legoscia in the comments:

For a node Node1 with magic cookie Cookie to be able to connect to, or accept a connection from, another node Node2 with a different cookie DiffCookie, the function erlang:set_cookie(Node2, DiffCookie) must first be called at Node1.

Please note that connections between Erlang nodes are by default transitive, meaning that you soon end up with a fully-connected cluster of Erlang nodes, which can heavily affect communication performances. An alternative approach, based on the concept of "group of nodes" is under research.