0
votes

is it possible to configure an erlang node with multiple long node names? Here are two use cases:

  1. I have an erlang node running on a machine with multiple IPs say 172.16.1.2 and 172.17.1.2. Other nodes in the cluster need to be able to send message to this node via either IP address. So I need the node to have the name of [email protected] and [email protected].

  2. I use the node in both IPC and RPC settings. Other processes in the same machine talk to this node via 127.0.0.1 (let's assume these processes are not aware of the external IP). The node also needs to talk to external world via the external IP. So it will be ideal that the node is run with [email protected] and x@.

Thanks.

1

1 Answers

2
votes

An erlang node cannot have multiple names. This is by design. For example, there can be at most one erl_epmd server which is responsible for registering the name to epmd.

Nevertheless, you can solve your use cases with hostnames instead of IPs. Each node will resolve the name locally. You can achieve this with your systems /etc/hosts file or with inetrc files.

Eventually, you might want to use short names instead of long names.