discovery-settings.asciidoc 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. [[modules-discovery-settings]]
  2. === Discovery and cluster formation settings
  3. Discovery and cluster formation are affected by the following settings:
  4. `discovery.seed_hosts`::
  5. Provides a list of master-eligible nodes in the cluster. Each value has the
  6. format `host:port` or `host`, where `port` defaults to the setting
  7. `transport.profiles.default.port`. Note that IPv6 hosts must be bracketed.
  8. The default value is `["127.0.0.1", "[::1]"]`. See <<unicast.hosts>>.
  9. `discovery.seed_providers`::
  10. Specifies which types of <<built-in-hosts-providers,seed hosts provider>>
  11. to use to obtain the addresses of the seed nodes used to start the
  12. discovery process. By default, it is the
  13. <<settings-based-hosts-provider,settings-based seed hosts provider>>.
  14. `discovery.type`::
  15. Specifies whether {es} should form a multiple-node cluster. By default, {es}
  16. discovers other nodes when forming a cluster and allows other nodes to join
  17. the cluster later. If `discovery.type` is set to `single-node`, {es} forms a
  18. single-node cluster. For more information about when you might use this
  19. setting, see <<single-node-discovery>>.
  20. `cluster.initial_master_nodes`::
  21. Sets the initial set of master-eligible nodes in a brand-new cluster. By
  22. default this list is empty, meaning that this node expects to join a cluster
  23. that has already been bootstrapped. See <<initial_master_nodes>>.
  24. [float]
  25. ==== Expert settings
  26. Discovery and cluster formation are also affected by the following
  27. _expert-level_ settings, although it is not recommended to change any of these
  28. from their default values.
  29. WARNING: If you adjust these settings then your cluster may not form correctly
  30. or may become unstable or intolerant of certain failures.
  31. `discovery.cluster_formation_warning_timeout`::
  32. Sets how long a node will try to form a cluster before logging a warning
  33. that the cluster did not form. Defaults to `10s`. If a cluster has not
  34. formed after `discovery.cluster_formation_warning_timeout` has elapsed then
  35. the node will log a warning message that starts with the phrase `master not
  36. discovered` which describes the current state of the discovery process.
  37. `discovery.find_peers_interval`::
  38. Sets how long a node will wait before attempting another discovery round.
  39. Defaults to `1s`.
  40. `discovery.probe.connect_timeout`::
  41. Sets how long to wait when attempting to connect to each address. Defaults
  42. to `3s`.
  43. `discovery.probe.handshake_timeout`::
  44. Sets how long to wait when attempting to identify the remote node via a
  45. handshake. Defaults to `1s`.
  46. `discovery.request_peers_timeout`::
  47. Sets how long a node will wait after asking its peers again before
  48. considering the request to have failed. Defaults to `3s`.
  49. `discovery.seed_resolver.max_concurrent_resolvers`::
  50. Specifies how many concurrent DNS lookups to perform when resolving the
  51. addresses of seed nodes. Defaults to `10`.
  52. `discovery.seed_resolver.timeout`::
  53. Specifies how long to wait for each DNS lookup performed when resolving the
  54. addresses of seed nodes. Defaults to `5s`.
  55. `cluster.auto_shrink_voting_configuration`::
  56. Controls whether the <<modules-discovery-voting,voting configuration>>
  57. sheds departed nodes automatically, as long as it still contains at least 3
  58. nodes. The default value is `true`. If set to `false`, the voting
  59. configuration never shrinks automatically and you must remove departed
  60. nodes manually with the <<voting-config-exclusions,voting configuration
  61. exclusions API>>.
  62. [[master-election-settings]]`cluster.election.back_off_time`::
  63. Sets the amount to increase the upper bound on the wait before an election
  64. on each election failure. Note that this is _linear_ backoff. This defaults
  65. to `100ms`. Changing this setting from the default may cause your cluster
  66. to fail to elect a master node.
  67. `cluster.election.duration`::
  68. Sets how long each election is allowed to take before a node considers it
  69. to have failed and schedules a retry. This defaults to `500ms`. Changing
  70. this setting from the default may cause your cluster to fail to elect a
  71. master node.
  72. `cluster.election.initial_timeout`::
  73. Sets the upper bound on how long a node will wait initially, or after the
  74. elected master fails, before attempting its first election. This defaults
  75. to `100ms`. Changing this setting from the default may cause your cluster
  76. to fail to elect a master node.
  77. `cluster.election.max_timeout`::
  78. Sets the maximum upper bound on how long a node will wait before attempting
  79. an first election, so that an network partition that lasts for a long time
  80. does not result in excessively sparse elections. This defaults to `10s`.
  81. Changing this setting from the default may cause your cluster to fail to
  82. elect a master node.
  83. [[fault-detection-settings]]`cluster.fault_detection.follower_check.interval`::
  84. Sets how long the elected master waits between follower checks to each
  85. other node in the cluster. Defaults to `1s`. Changing this setting from the
  86. default may cause your cluster to become unstable.
  87. `cluster.fault_detection.follower_check.timeout`::
  88. Sets how long the elected master waits for a response to a follower check
  89. before considering it to have failed. Defaults to `10s`. Changing this
  90. setting from the default may cause your cluster to become unstable.
  91. `cluster.fault_detection.follower_check.retry_count`::
  92. Sets how many consecutive follower check failures must occur to each node
  93. before the elected master considers that node to be faulty and removes it
  94. from the cluster. Defaults to `3`. Changing this setting from the default
  95. may cause your cluster to become unstable.
  96. `cluster.fault_detection.leader_check.interval`::
  97. Sets how long each node waits between checks of the elected master.
  98. Defaults to `1s`. Changing this setting from the default may cause your
  99. cluster to become unstable.
  100. `cluster.fault_detection.leader_check.timeout`::
  101. Sets how long each node waits for a response to a leader check from the
  102. elected master before considering it to have failed. Defaults to `10s`.
  103. Changing this setting from the default may cause your cluster to become
  104. unstable.
  105. `cluster.fault_detection.leader_check.retry_count`::
  106. Sets how many consecutive leader check failures must occur before a node
  107. considers the elected master to be faulty and attempts to find or elect a
  108. new master. Defaults to `3`. Changing this setting from the default may
  109. cause your cluster to become unstable.
  110. `cluster.follower_lag.timeout`::
  111. Sets how long the master node waits to receive acknowledgements for cluster
  112. state updates from lagging nodes. The default value is `90s`. If a node
  113. does not successfully apply the cluster state update within this period of
  114. time, it is considered to have failed and is removed from the cluster. See
  115. <<cluster-state-publishing>>.
  116. `cluster.join.timeout`::
  117. Sets how long a node will wait after sending a request to join a cluster
  118. before it considers the request to have failed and retries. Defaults to
  119. `60s`.
  120. `cluster.max_voting_config_exclusions`::
  121. Sets a limit on the number of voting configuration exclusions at any one
  122. time. The default value is `10`. See
  123. <<modules-discovery-adding-removing-nodes>>.
  124. `cluster.publish.timeout`::
  125. Sets how long the master node waits for each cluster state update to be
  126. completely published to all nodes. The default value is `30s`. See
  127. <<cluster-state-publishing>>.
  128. [[no-master-block]]`cluster.no_master_block`::
  129. Specifies which operations are rejected when there is no active master in a
  130. cluster. This setting has two valid values:
  131. +
  132. --
  133. `all`::: All operations on the node (both read and write operations) are rejected.
  134. This also applies for API cluster state read or write operations, like the get
  135. index settings, put mapping and cluster state API.
  136. `write`::: (default) Write operations are rejected. Read operations succeed,
  137. based on the last known cluster configuration. This situation may result in
  138. partial reads of stale data as this node may be isolated from the rest of the
  139. cluster.
  140. [NOTE]
  141. ===============================
  142. * The `cluster.no_master_block` setting doesn't apply to nodes-based APIs
  143. (for example, cluster stats, node info, and node stats APIs). Requests to these
  144. APIs are not be blocked and can run on any available node.
  145. * For the cluster to be fully operational, it must have an active master.
  146. ===============================
  147. --