tags:

views:

74

answers:

1

When nodes connect to each other on Erlang, why not just use the original port the connection is made on? Why cause the firewall issues that using random ports causes. I know how to get around this, but I don't understand why.

Edit: I realize that this is frequently done, and this isn't necessarily an Erlang question, but it was a design choice made in Erlang, and I'm curious what the advantage of this method is.

+2  A: 

It's not abnormal for classic RPC services wanting do ad-hoc communication.

You can specify the ports with kernel parameters, e.g.:

-kernel inet_dist_listen_min 21100 inet_dist_listen_max 21199
Dustin
I know it's not abnormal, but it's inconvenient. Why do it?
AlexH
If you were going to have an arbitrary number of applications running on a host communicating with an arbitrary number of other applications running on the same or other hosts, how would you do it?
Dustin
+1 to comment. It is the firewall behaviour that is evil.
Koistinen