liveBook · Manning

Long name

As explained in Elixir in Action, Third Edition

A long node name identifies a distributed Erlang node using a fully qualified host name.

A long node name identifies a BEAM instance with a prefix and fully qualified host name, such as node1@some_host.some_domain or node1@127.0.0.1. The host portion must resolve to the machine’s IP address when nodes connect. section 12.3.1

Use long names when distributed nodes need fully qualified host or IP addressing:

  • Start IEx with --name instead of --sname. section 12.3.1
  • Connect only to nodes using the same naming mode; long-named and short-named nodes cannot connect. section 12.3.1
  • Configure releases with RELEASE_NODE and set RELEASE_DISTRIBUTION=name for long-name operation. section 13.2.2

Start a long-named node

Run $ iex --name node1@some_host.some_domain, or use an IP address such as node1@127.0.0.1. The shell prompt displays the resulting node name. section 12.3.1

$ iex --name node1@127.0.0.1
iex(node1@127.0.0.1)1>        #1

Compare long-name startup with the resulting IEx prompt. section 12.3.1

How Elixir in Action, Third Edition covers it

How deep it goes
Explains naming, hostname resolution, compatibility, and release configuration without detailing the distribution protocol internals.
Examples
Uses IEx startup commands with symbolic fully qualified hosts, IP addresses, and RELEASE_NODE release settings.
What it assumes
Assumes familiarity with IEx and node connections while distinguishing long names from short names.
What you can do after
Operate/configure distributed nodes with --name and configure releases for long-name distribution.
How it connects
Connects node names with short node names, BEAM nodes, distributed systems, and release configuration.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Elixir in Action, Third Edition. The section links point to the parts of the book it draws on.