libcluster v2.5.0 Cluster.Strategy.ErlangHosts
This clustering strategy relies on Erlang’s built-in distribution protocol by using a .hosts.erlang file (as used by the :net_adm module)
Please see http://erlang.org/doc/man/net_adm.html for more details.
You can have libcluster automatically connect nodes on startup for you by configuring the strategy like below:
An optional timeout can be specified in the config. This is the timeout that
will be used in the GenServer to connect the nodes. This defaults to
:infinity
meaning that the connection process will only happen when the
worker is started. Any integer timeout will result in the connection process
being triggered. In the example below, it has been configured for 30 seconds.
config :libcluster, topologies: [
erlang_hosts_example: [
strategy: Elixir.Cluster.Strategy.ErlangHosts,
config: [timeout: 30_000]]]
Link to this section Summary
Functions
Callback implementation for Cluster.Strategy.start_link/1
Link to this section Functions
Callback implementation for Cluster.Strategy.start_link/1
.