cluster-with-etcd-ssl.conf.example 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. server = "http://ur1,http://ur2"
  22. ## Key prefix used for EMQX service discovery
  23. prefix = emqxcl
  24. ## Expiration time of the etcd key associated with the node.
  25. node_ttl = 1m
  26. ssl_options {
  27. ## Trusted PEM format CA certificates bundle file
  28. cacertfile = "data/certs/cacert.pem"
  29. ## PEM format certificates chain file
  30. certfile = "data/certs/cert.pem"
  31. ## PEM format private key file
  32. keyfile = "data/certs/key.pem"
  33. ## Enable or disable peer verification
  34. verify = verify_none ## use verify_peer to enable
  35. ## if `verify' is ebabled, whit true, the connection fails if the client does not have a certificate to send
  36. fail_if_no_peer_cert = false
  37. ## Enable TLS session reuse
  38. reuse_sessions = true
  39. ## Maximum number of non-self-issued intermediate certificates that can follow the peer certificate in a valid certification path
  40. depth = 10
  41. ## Which versions are to be supported
  42. versions = [tlsv1.3, tlsv1.2]
  43. ## TLS cipher suite names
  44. ## Note: By default, all available suites are supported, you do not need to set this
  45. ciphers = ["TLS_AES_256_GCM_SHA384","TLS_AES_128_GCM_SHA256"]
  46. ## Allows a client and a server to renegotiate the parameters of the SSL connection on the fly
  47. secure_renegotiate = true
  48. ## Log level for SSL communication
  49. ## Type: emergency | alert | critical | error | warning | notice | info | debug | none | all
  50. log_level = notice
  51. ## Hibernate the SSL process after idling for amount of time reducing its memory footprint
  52. hibernate_after = 5s
  53. ## Forces the cipher to be set based on the server-specified order instead of the client-specified order
  54. honor_cipher_order = true
  55. ## Setting this to false to disable client-initiated renegotiation
  56. client_renegotiation = true
  57. ## Maximum time duration allowed for the handshake to complete
  58. handshake_timeout = 15s
  59. }
  60. }
  61. }