cluster-with-etcd.conf.example 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. ##--------------------------------------------------------------------
  2. ## Cluster in service discovery using 'etcd' service 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 = etcd
  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. etcd {
  20. ## List of endpoint URLs of the etcd cluster
  21. ## Type: Comma Separated String
  22. server = "http://ur1,http://ur2"
  23. ## Key prefix used for EMQX service discovery
  24. prefix = emqxcl
  25. ## Expiration time of the etcd key associated with the node
  26. node_ttl = 1m
  27. }
  28. }