emqx/examples/cluster-with-dns.conf.example
2023-06-20 14:53:14 +08:00

34 lines
1.1 KiB
Plaintext

##--------------------------------------------------------------------
## Cluster in service discovery via DNS SRV records mode
##
## Configs to instruct how individual nodes can discover each other
##--------------------------------------------------------------------
## Note: This is an example of how to configure this feature
## you should copy and paste the below data into the emqx.conf for working
cluster {
## Human-friendly name of the EMQX cluster.
name = emqxcl
## Service discovery method for the cluster nodes
discovery_strategy = dns
## List of core nodes that the replicant will connect to
core_nodes = ['emqx1@192.168.0.1', 'emqx2@192.168.0.2']
## Remove disconnected nodes from the cluster after this interval
autoclean = 5m
## If true, the node will try to heal network partitions automatically
autoheal = true
dns {
## The domain name from which to discover peer EMQX nodes' IP addresses
name = localhost
## DNS record type
## Type: enum: a | srv
record_type = a
}
}