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
|
|
|
|
2018-12-20 08:02:44 -05:00
|
|
|
The discovery and cluster formation module is responsible for discovering
|
|
|
|
nodes, electing a master, forming a cluster, and publishing the cluster state
|
|
|
|
each time it changes. It is integrated with other modules. For example, all
|
|
|
|
communication between nodes is done using the <<modules-transport,transport>>
|
|
|
|
module. This module is divided into the following sections:
|
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
|
|
|
|
2018-12-20 08:02:44 -05:00
|
|
|
<<modules-discovery-bootstrap-cluster>>::
|
2013-08-28 19:24:34 -04:00
|
|
|
|
2018-12-20 08:02:44 -05:00
|
|
|
Bootstrapping a cluster is required when an Elasticsearch cluster starts up
|
|
|
|
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.
|
|
|
|
|
|
|
|
<<modules-discovery-quorums>>::
|
|
|
|
|
|
|
|
This section describes the detailed design behind the master election and
|
|
|
|
auto-reconfiguration logic.
|
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[]
|
|
|
|
|
|
|
|
include::discovery/bootstrapping.asciidoc[]
|
|
|
|
|
|
|
|
include::discovery/adding-removing-nodes.asciidoc[]
|
|
|
|
|
|
|
|
include::discovery/publishing.asciidoc[]
|
|
|
|
|
2018-12-21 14:24:48 -05:00
|
|
|
include::discovery/quorums.asciidoc[]
|
2018-12-20 08:02:44 -05:00
|
|
|
|
|
|
|
include::discovery/fault-detection.asciidoc[]
|
|
|
|
|
2018-12-21 14:24:48 -05:00
|
|
|
include::discovery/discovery-settings.asciidoc[]
|