Erlang clusters

前端 未结 5 1975
栀梦
栀梦 2021-02-05 10:31

I\'m trying to implement a cluster using Erlang as the glue that holds it all together. I like the idea that it creates a fully connected graph of nodes, but upon reading differ

5条回答
  •  遥遥无期
    2021-02-05 10:57

    There are some good answers already, so I'm trying to be simple.

    1) No, if A and E are not connected directly, A cannot talk to E. The distribution protocol runs on direct TCP connection - no routing included.

    2) I think a tree structure is good enough - trade-offs always exist.

    3) There's no 'supervisor for nodes', but erlang:monitor_node is your friend.

    4) Yes. A node can talk to nodes from different 'clusters'. In the local node, use erlang:set_cookie(OtherNode, OtherCookie) to access a remote node with a different cookie.

提交回复
热议问题