The links associated with the node name do not imply randomness, just uniqueness. As you already noticed, they are created cyclically. In addition, you correctly pointed out that the links are unique only for the lifetime of the node. As soon as you restart the virtual machine, the links can be repeated.
As with PID, #Ref<WXYZ> printed links contain - as their first element ( W ) - information about the node number:
erl -sname right Erlang R15B (erts-5.9) [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false] Eshell V5.9 (abort with ^G) ( right@mars )1> register(right, self()). true ( right@mars )2> receive M -> M end.
Notice how, in this case, W for link 0 in the local node, 6793 on the remote.
Roberto aloi
source share