[[modules-discovery]] == Discovery and cluster formation 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 <> module. This module is divided into the following sections: <>:: 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. <>:: This section describes how {es} uses a quorum-based voting mechanism to make decisions even if some nodes are unavailable. <>:: This section describes the concept of voting configurations, which {es} automatically updates as nodes leave and join the cluster. <>:: Bootstrapping a cluster is required when an Elasticsearch cluster starts up for the very first time. In <>, with no discovery settings configured, this is automatically performed by the nodes themselves. As this auto-bootstrapping is <>, running a node in <> requires bootstrapping to be explicitly configured via the <>. <>:: 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 is the process by which the elected master node updates the cluster state on all the other nodes in the cluster. <>:: {es} performs health checks to detect and remove faulty nodes. <>:: There are settings that enable users to influence the discovery, cluster formation, master election and fault detection processes. include::discovery/discovery.asciidoc[] include::discovery/quorums.asciidoc[] include::discovery/voting.asciidoc[] include::discovery/bootstrapping.asciidoc[] include::discovery/adding-removing-nodes.asciidoc[] include::discovery/publishing.asciidoc[] include::discovery/fault-detection.asciidoc[] include::discovery/discovery-settings.asciidoc[]