Cluster.Strategy.DNSPoll (libcluster v3.3.0) View Source

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"]]]

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.