The Erlang runtime and EPMD takes care of this for you.
Every node in the cluster gets a name, so you can address it directly, and, every PID is unique across nodes on a cluster, so you can send messages to processes (actors) no matter where they are in the cluster.
OTP is super powerful out of the box :)