I’m a newbie to Elixir and I’m just going through the Programming Elixir book. One of the many fascinating things is nodes to connect to each other and the ability to pass messages between processes that can even cross machines.
I do have questions on the underlying protocol being used for the messaging. I’m assuming its TCP - but if the nodes are on the same underlying host, does it use shared memory for faster speed instead of going through TCP for local communication?
Also, it seems that connecting to nodes across a public network is not recommended because the cookie is sent plain text. Is this accurate?
Finally - are there any performance benchmarks on how much message throughput can be handled from a single node?
Thanks - and please point me to documentation if these questions are covered there.
A good place to start is the Distributed Erlang section in the Erlang reference manual.
IIRC the protocol involves sending data as External Term Format to remote nodes; for communicating with processes on the same node, the entire term → ETF → term conversion is skipped.
However Erlang originally wasn’t designed with distribution working over internet, it was originally meant to work over intranet in same DC (or even rack). Nowadays most of the issues are ironed out, but for example default distribution still use insecure connections and is not really secure to use without bunch of configuration (cookies aren’t security measure anymore).