EPMD-less Erlang distribution with a fixed port — drops the epmd dependency (and port 4369) entirely.
Normally a node binds an ephemeral distribution port and registers
name → port with epmd (the Erlang Port Mapper Daemon, port 4369); peers ask
epmd to resolve a node's port before connecting. With one BEAM per IP
(e.g. one pod per IP in Kubernetes) and a pinned distribution port, that
indirection is pointless: every node's port is known and identical, so there
is nothing for epmd to disambiguate.
This module implements the erl_epmd callback contract to answer "what port
is node X on?" with a constant, performing no network lookup and
registering with nothing. Combined with -start_epmd false and a pinned
inet_dist_listen_min/max (both emitted by the shellless_release launcher),
it removes epmd from the system completely.
Enabling
The launcher passes -epmd_module Elixir.ShelllessRelease.EpmdLess -start_epmd false when EPMD-less mode is on (see the launcher / step config).
The fixed port must match the launcher's pinned DIST_PORT; it is read from
the DIST_PORT OS env (the launcher exports it) and falls back to the
compile-time default.
Caveats
- Requires one node per IP — this is exactly the K8s pod model. Do not use where multiple nodes share a host/IP.
- Discovery (which IPs are peers) is still your clustering strategy's job
(e.g.
libcluster's Kubernetes strategy lists pod IPs via the K8s API). This module only answers the "which port" question, not "which hosts".
Summary
Functions
The fixed distribution port all nodes use.
Functions
@spec dist_port() :: :inet.port_number()
The fixed distribution port all nodes use.