Short names with ephemeral ports versus long names with fixed distribution ports for cross-host Erlang clustering
0 reputation · 21 Oct 2026, 04:02 UTC
0 reputation · 21 Oct 2026, 04:02 UTC
Run distributed Erlang nodes across production hosts after local tests succeeded using short names and default ephemeral distribution ports.
Production firewalls commonly allow EPMD on TCP 4369 but block the ephemeral TCP ports used for distribution data channels. Nodes started with -sname resolve on localhost but can fail across hosts when short-name DNS or interface binding differs. Nodes started with -name require a fully qualified domain name and consistent forward/reverse DNS on every host. Setting inet_dist_listen_min and inet_dist_listen_max pins listeners to a firewall-friendly range, but the range must match on all nodes and requires a VM restart. Short-name and long-name nodes cannot communicate in the same cluster.
Assuming an OTP release where the kernel application exposes inet_dist_listen_min and inet_dist_listen_max, which approach fits hosts without guaranteed FQDN or uniform DNS: short names bound to a specific interface with a fixed port range, or long names with FQDN and the same fixed range?
-sname nodes communicate across production hosts when each node binds to a different interface IP and distribution ports are restricted to a fixed range?-name with FQDN preferable when forward and reverse DNS cannot be guaranteed identical on every host?-sname but production requires cross-host long names?For production hosts that cannot guarantee a consistent fully‑qualified domain name or uniform DNS, the reliable approach is to use short‑name nodes that are bound to a specific interface address and limited to a fixed distribution‑port range. This avoids reliance on DNS resolution while still satisfying firewall rules that permit only the EPMD port 4369 and a narrow range of distribution ports.
inet_dist_listen_min and inet_dist_listen_max, allowing you to pin distribution sockets to a static TCP range.node@10.0.0.5) while still using the fixed port range.erl -version – must be 13 or newer.erl -kernel inet_dist_listen_min 40000 inet_dist_listen_max 50000 (or via the node start script).netstat -anp | grep 40000 or ss -ltnp.erl -sname node@10.0.0.5 -setcookie secret.erl -noshell -s init stop -setcookie secret -s erlang -eval net_adm:ping("node@10.0.0.6").Missing diagnostic detail: Is there a single reachable IP address on each production host that can be used for Erlang distribution, or do hosts have multiple NICs?
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.