2013-08-28 19:24:34 -04:00
|
|
|
[[modules-discovery]]
|
2018-12-20 08:02:44 -05:00
|
|
|
== Discovery and cluster formation
|
2013-08-28 19:24:34 -04:00
|
|
|
|
2020-06-01 14:13:13 -04:00
|
|
|
The discovery and cluster formation processes are responsible for discovering
|
2018-12-20 08:02:44 -05:00
|
|
|
nodes, electing a master, forming a cluster, and publishing the cluster state
|
2020-06-01 14:13:13 -04:00
|
|
|
each time it changes. All communication between nodes is done using the
|
|
|
|
<<modules-transport,transport>> layer.
|
|
|
|
|
|
|
|
The following processes and settings are part of discovery and cluster
|
|
|
|
formation:
|
2013-08-28 19:24:34 -04:00
|
|
|
|
2018-12-20 08:02:44 -05:00
|
|
|
<<modules-discovery-hosts-providers>>::
|
2013-08-28 19:24:34 -04:00
|
|
|
|
2018-12-20 08:02:44 -05:00
|
|
|
Discovery is the process where nodes find each other when the master is
|
|
|
|
unknown, such as when a node has just started up or when the previous
|
|
|
|
master has failed.
|
2013-08-28 19:24:34 -04:00
|
|
|
|
2019-01-07 12:11:14 -05:00
|
|
|
<<modules-discovery-quorums>>::
|
|
|
|
|
2020-06-01 14:13:13 -04:00
|
|
|
How {es} uses a quorum-based voting mechanism to
|
2019-01-07 12:11:14 -05:00
|
|
|
make decisions even if some nodes are unavailable.
|
|
|
|
|
|
|
|
<<modules-discovery-voting>>::
|
|
|
|
|
2020-06-01 14:13:13 -04:00
|
|
|
How {es} automatically updates voting configurations as nodes leave and join
|
|
|
|
a cluster.
|
2019-01-07 12:11:14 -05:00
|
|
|
|
2018-12-20 08:02:44 -05:00
|
|
|
<<modules-discovery-bootstrap-cluster>>::
|
2013-08-28 19:24:34 -04:00
|
|
|
|
2020-06-01 14:13:13 -04:00
|
|
|
Bootstrapping a cluster is required when an {es} cluster starts up
|
2018-12-20 08:02:44 -05:00
|
|
|
for the very first time. In <<dev-vs-prod-mode,development mode>>, with no
|
|
|
|
discovery settings configured, this is automatically performed by the nodes
|
|
|
|
themselves. As this auto-bootstrapping is
|
|
|
|
<<modules-discovery-quorums,inherently unsafe>>, running a node in
|
|
|
|
<<dev-vs-prod-mode,production mode>> requires bootstrapping to be
|
|
|
|
explicitly configured via the
|
|
|
|
<<modules-discovery-bootstrap-cluster,`cluster.initial_master_nodes`
|
|
|
|
setting>>.
|
2014-02-05 12:06:39 -05:00
|
|
|
|
2018-12-20 08:02:44 -05:00
|
|
|
<<modules-discovery-adding-removing-nodes,Adding and removing master-eligible nodes>>::
|
2013-08-28 19:24:34 -04:00
|
|
|
|
2018-12-20 08:02:44 -05:00
|
|
|
It is recommended to have a small and fixed number of master-eligible nodes
|
|
|
|
in a cluster, and to scale the cluster up and down by adding and removing
|
|
|
|
master-ineligible nodes only. However there are situations in which it may
|
|
|
|
be desirable to add or remove some master-eligible nodes to or from a
|
|
|
|
cluster. This section describes the process for adding or removing
|
|
|
|
master-eligible nodes, including the extra steps that need to be performed
|
|
|
|
when removing more than half of the master-eligible nodes at the same time.
|
|
|
|
|
|
|
|
<<cluster-state-publishing>>::
|
|
|
|
|
|
|
|
Cluster state publishing is the process by which the elected master node
|
|
|
|
updates the cluster state on all the other nodes in the cluster.
|
|
|
|
|
2019-01-07 12:11:14 -05:00
|
|
|
<<cluster-fault-detection>>::
|
|
|
|
|
|
|
|
{es} performs health checks to detect and remove faulty nodes.
|
2018-12-20 08:02:44 -05:00
|
|
|
|
2018-12-21 14:24:48 -05:00
|
|
|
<<modules-discovery-settings,Settings>>::
|
|
|
|
|
|
|
|
There are settings that enable users to influence the discovery, cluster
|
|
|
|
formation, master election and fault detection processes.
|
2018-12-20 08:02:44 -05:00
|
|
|
|
|
|
|
include::discovery/discovery.asciidoc[]
|
|
|
|
|
2019-01-07 12:11:14 -05:00
|
|
|
include::discovery/quorums.asciidoc[]
|
|
|
|
|
|
|
|
include::discovery/voting.asciidoc[]
|
|
|
|
|
2018-12-20 08:02:44 -05:00
|
|
|
include::discovery/bootstrapping.asciidoc[]
|
|
|
|
|
|
|
|
include::discovery/publishing.asciidoc[]
|
|
|
|
|
|
|
|
include::discovery/fault-detection.asciidoc[]
|