cluster-with-dns.conf.example 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. ##--------------------------------------------------------------------
  2. ## Cluster in service discovery via DNS SRV records mode
  3. ##
  4. ## Configs to instruct how individual nodes can discover each other
  5. ##--------------------------------------------------------------------
  6. ## Note: This is an example of how to configure this feature
  7. ## you should copy and paste the below data into the emqx.conf for working
  8. cluster {
  9. ## Human-friendly name of the EMQX cluster.
  10. name = emqxcl
  11. ## Service discovery method for the cluster nodes
  12. discovery_strategy = dns
  13. ## List of core nodes that the replicant will connect to
  14. core_nodes = ["emqx1@192.168.0.1", "emqx2@192.168.0.2"]
  15. ## Remove disconnected nodes from the cluster after this interval
  16. autoclean = 5m
  17. ## If true, the node will try to heal network partitions automatically
  18. autoheal = true
  19. dns {
  20. ## The domain name from which to discover peer EMQX nodes' IP addresses
  21. name = localhost
  22. ## DNS record type
  23. ## Type: enum: a | srv
  24. record_type = a
  25. }
  26. }