O'Reilly logo

Elixir Cookbook by Paulo A Pereira

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating named nodes

Until now, we have been using our IEx sessions without naming them. You may notice this because the prompt for the IEx terminal session only has this indication: iex(1)>. The IEx session is a node, and if we run two or more different nodes, even on the same machine, we are running multiple instances of the Erlang virtual machine.

Using two nodes on the same machine or two nodes on different machines is exactly the same thing, apart from connection latency, and that is why there is a need to connect them securely.

By executing several nodes, we are paving the way for distribution and fault tolerance. At this point, we will be focusing on the task of naming our nodes to make them easier to access.

Getting ready

In this recipe, we ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required