View Source Cluster.Strategy.DNSPoll (libcluster v3.4.1)
Assumes you have nodes that respond to the specified DNS query (A record), and which follow the node name pattern of
<name>@<ip-address>
. If your setup matches those assumptions, this strategy will periodically poll DNS and connect
all nodes it finds.
Options
poll_interval
- How often to poll in milliseconds (optional; default: 5_000)query
- DNS query to use (required; e.g. "my-app.example.com")node_basename
- The short name of the nodes you wish to connect to (required; e.g. "my-app")
Usage
config :libcluster,
topologies: [
dns_poll_example: [
strategy: Elixir.Cluster.Strategy.DNSPoll,
config: [
polling_interval: 5_000,
query: "my-app.example.com",
node_basename: "my-app"]]]
Summary
Functions
Returns a specification to start this module under a supervisor.