=rem #15007 add ability to bind to a different address than the remoting waits messages from

This can be used to traverse NATs with the following configuration:

akka.remote.netty.tcp {
  ...
  hostname = my-external-address.lt
  bind-hostname = 192.168.1.100
}

Use Akka BoundAddressesExtension to get bound addresses
This commit is contained in:
Martynas Mickevicius 2014-09-15 18:30:12 +03:00
parent 60ab0fb3d0
commit 47556a0ebf
13 changed files with 328 additions and 24 deletions

View file

@ -111,7 +111,7 @@ Observe all the parts you need here:
* ``system`` is the remote systems name (must match exactly, case-sensitive!)
* ``host`` is the remote systems IP address or DNS name, and it must match that
systems configuration (i.e. `akka.remote.netty.hostname`)
systems configuration (i.e. `akka.remote.netty.tcp.hostname`)
* ``1234`` is the port number on which the remote system is listening for
connections and receiving messages
@ -131,6 +131,14 @@ The most common reason is that the local systems name (i.e. the
systems network location, e.g. because ``host`` was configured to be ``0.0.0.0``,
``localhost`` or a NATed IP address.
If you are running an ActorSystem under a NAT or inside a docker container, make sure to
set `akka.remote.netty.tcp.hostname` and `akka.remote.netty.tcp.port` to the address
it is reachable at from other ActorSystems. If you need to bind your network interface
to a different address - use `akka.remote.netty.tcp.bind-hostname` and
`akka.remote.netty.tcp.bind-port` settings. Also make sure your network is configured
to translate from the address your ActorSystem is reachable at to the address your
ActorSystem network interface is bound to.
How reliable is the message delivery?
-------------------------------------