Erlang Clusters without EPMD

Explore the scenarios in which we can use Erlang clusters without EPMD.

We'll cover the following

Removing EPMD

If nodes run on a known port, there is no need to run EPMD alongside the Erlang VM. We have seen this being handy in two different situations.

In the first situation, all communication had to be encrypted, no questions asked. In the second case, the operations team had to explicitly authorize each port. Sometimes those rules are in place by corporate mandate. You could try to break the rules, but new technology adopters must choose battles wisely. Other times, the rules are there because of external needs, such as in financial institutions or health organizations dealing with patient data.

There are multiple ways to ensure Erlang nodes run on a known port. One option is to choose a fixed port and apply it to all nodes. For this example, we’ll choose a slightly more complex mechanism. We’ll encode the port in the node name. For example, a node named "example" should now be named "example9100", where 9100 is the port it is running on. Once we’ve chosen this mechanism, we can implement a custom EPMD client module that won’t invoke EPMD at all. Instead, we can parse the port out of the node name.

Let’s start with the EPMD client module. It needs to implement a group of functions, like this:

Get hands-on with 1200+ tech skills courses.