|
1 | 1 | [[modules-discovery-hosts-providers]] |
2 | 2 | === Discovery |
3 | 3 |
|
4 | | -The cluster formation module uses a list of _seed_ nodes in order to start off |
5 | | -the discovery process. When you start an Elasticsearch node, or when a node |
6 | | -believes the master node failed, that node tries to connect to each |
7 | | -seed node in its list. After a connection occurs, the two nodes repeatedly share |
8 | | -information about the other known master-eligible nodes in the cluster in order |
9 | | -to build a complete picture of the cluster. By default the cluster formation |
10 | | -module offers two hosts providers to configure the list of seed nodes: a |
11 | | -_settings_-based and a _file_-based hosts provider. It can be extended to |
12 | | -support cloud environments and other forms of hosts providers via |
13 | | -{plugins}/discovery.html[discovery plugins]. Hosts providers are configured |
14 | | -using the `discovery.zen.hosts_provider` setting, which defaults to the |
15 | | -_settings_-based hosts provider. Multiple hosts providers can be specified as a |
16 | | -list. |
| 4 | +Discovery is the process by which the cluster formation module finds other |
| 5 | +nodes with which to form a cluster. This process runs when you start an |
| 6 | +Elasticsearch node or when a node believes the master node failed and continues |
| 7 | +until the master node is found or a new master node is elected. |
| 8 | + |
| 9 | +Discovery operates in two phases: First, each node probes the addresses of all |
| 10 | +known master-eligible nodes by connecting to each address and attempting to |
| 11 | +identify the node to which it is connected. Secondly it shares with the remote |
| 12 | +node a list of all of its known master-eligible peers and the remote node |
| 13 | +responds with _its_ peers in turn. The node then probes all the new nodes that |
| 14 | +it just discovered, requests their peers, and so on. |
| 15 | + |
| 16 | +This process starts with a list of _seed_ addresses from one or more |
| 17 | +<<built-in-hosts-providers,hosts providers>>, together with the addresses of |
| 18 | +any master-eligible nodes that were in the last known cluster. The process |
| 19 | +operates in two phases: First, each node probes the seed addresses by |
| 20 | +connecting to each address and attempting to identify the node to which it is |
| 21 | +connected. Secondly it shares with the remote node a list of all of its known |
| 22 | +master-eligible peers and the remote node responds with _its_ peers in turn. |
| 23 | +The node then probes all the new nodes that it just discovered, requests their |
| 24 | +peers, and so on. |
| 25 | + |
| 26 | +If the node is not master-eligible then it continues this discovery process |
| 27 | +until it has discovered an elected master node. If no elected master is |
| 28 | +discovered then the node will retry after `discovery.find_peers_interval` which |
| 29 | +defaults to `1s`. |
| 30 | + |
| 31 | +If the node is master-eligible then it continues this discovery process until it |
| 32 | +has either discovered an elected master node or else it has discovered enough |
| 33 | +masterless master-eligible nodes to complete an election. If neither of these |
| 34 | +occur quickly enough then the node will retry after |
| 35 | +`discovery.find_peers_interval` which defaults to `1s`. |
| 36 | + |
| 37 | +[[built-in-hosts-providers]] |
| 38 | +==== Hosts providers |
| 39 | + |
| 40 | +By default the cluster formation module offers two hosts providers to configure |
| 41 | +the list of seed nodes: a _settings_-based and a _file_-based hosts provider. |
| 42 | +It can be extended to support cloud environments and other forms of hosts |
| 43 | +providers via {plugins}/discovery.html[discovery plugins]. Hosts providers are |
| 44 | +configured using the `discovery.zen.hosts_provider` setting, which defaults to |
| 45 | +the _settings_-based hosts provider. Multiple hosts providers can be specified |
| 46 | +as a list. |
17 | 47 |
|
18 | 48 | [float] |
19 | 49 | [[settings-based-hosts-provider]] |
@@ -131,24 +161,6 @@ that uses the GCE API find a list of seed nodes. |
131 | 161 | [float] |
132 | 162 | ==== Discovery settings |
133 | 163 |
|
134 | | -Discovery operates in two phases: First, each node probes the addresses of all |
135 | | -known master-eligible nodes by connecting to each address and attempting to |
136 | | -identify the node to which it is connected. Secondly it shares with the remote |
137 | | -node a list of all of its known master-eligible peers and the remote node |
138 | | -responds with _its_ peers in turn. The node then probes all the new nodes that |
139 | | -it just discovered, requests their peers, and so on. |
140 | | - |
141 | | -If the node is not master-eligible then it continues this discovery process |
142 | | -until it has discovered an elected master node. If no elected master is |
143 | | -discovered then the node will retry after `discovery.find_peers_interval` which |
144 | | -defaults to `1s`. |
145 | | - |
146 | | -If the node is master-eligible then it continues this discovery process until it |
147 | | -has either discovered an elected master node or else it has discovered enough |
148 | | -masterless master-eligible nodes to complete an election. If neither of these |
149 | | -occur quickly enough then the node will retry after |
150 | | -`discovery.find_peers_interval` which defaults to `1s`. |
151 | | - |
152 | 164 | The discovery process is controlled by the following settings. |
153 | 165 |
|
154 | 166 | `discovery.find_peers_interval`:: |
|
0 commit comments