cluster-with-dns.conf.example 990 B

123456789101112131415161718192021222324252627282930
  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. ## If true, the node will try to heal network partitions automatically
  16. autoheal = true
  17. dns {
  18. ## The domain name from which to discover peer EMQX nodes' IP addresses
  19. name = localhost
  20. ## DNS record type
  21. ## Type: enum: a | srv
  22. record_type = a
  23. }
  24. }