A node name identifies a BEAM instance for distributed connections. It combines a prefix with a host: short names use a host name, while long names use a fully qualified host name or IP address. BEAM represents the name internally as an atom. section 12.1.1 section 12.3.1
$ iex --sname node1@localhost #1 iex(node1@localhost)1> #2
Start an IEx process with a short node name and observe the name shown in the prompt. section 12.1.1
Use node names with these operational constraints:
- Connect nodes with Node.connect/1, which establishes a TCP connection between BEAM instances. section 12.1.1
- Resolve the host portion to the machine’s IP address before connecting across hosts. section 12.3.1
- Use the same naming type on both ends; long-named and short-named nodes cannot connect. section 12.3.1
Connecting named nodes
Start node1 and node2 with compatible names, call Node.connect(:node1@localhost), and inspect the resulting connection with Node.list(). A third connected node can join the existing cluster through one member. section 12.1.1
