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

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