cluster-with-etcd.conf.example 1.1 KB

123456789101112131415161718192021222324252627282930313233
  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. ## If true, the node will try to heal network partitions automatically
  16. autoheal = true
  17. etcd {
  18. ## List of endpoint URLs of the etcd cluster
  19. ## Type: Comma Separated String
  20. server = "http://ur1,http://ur2"
  21. ## Key prefix used for EMQX service discovery
  22. prefix = emqxcl
  23. ## Expiration time of the etcd key associated with the node
  24. node_ttl = 1m
  25. }
  26. }