[DOCS] Adds recommendation on dedicated master-eligible nodes (#51674)
Co-Authored-By: James Rodewig <james.rodewig@elastic.co>
This commit is contained in:
parent
d7e1215e42
commit
9600ab4f57
|
@ -1,16 +1,14 @@
|
||||||
[[modules-node]]
|
[[modules-node]]
|
||||||
== Node
|
== Node
|
||||||
|
|
||||||
Any time that you start an instance of Elasticsearch, you are starting a
|
Any time that you start an instance of Elasticsearch, you are starting a _node_.
|
||||||
_node_. A collection of connected nodes is called a
|
A collection of connected nodes is called a <<modules-cluster,cluster>>. If you
|
||||||
<<modules-cluster,cluster>>. If you are running a single node of Elasticsearch,
|
are running a single node of {es}, then you have a cluster of one node.
|
||||||
then you have a cluster of one node.
|
|
||||||
|
|
||||||
Every node in the cluster can handle <<modules-http,HTTP>> and
|
Every node in the cluster can handle <<modules-http,HTTP>> and
|
||||||
<<modules-transport,Transport>> traffic by default. The transport layer
|
<<modules-transport,Transport>> traffic by default. The transport layer is used
|
||||||
is used exclusively for communication between nodes and the
|
exclusively for communication between nodes; the HTTP layer is used by REST
|
||||||
{javaclient}/transport-client.html[Java `TransportClient`]; the HTTP layer is
|
clients.
|
||||||
used only by external REST clients.
|
|
||||||
|
|
||||||
All nodes know about all the other nodes in the cluster and can forward client
|
All nodes know about all the other nodes in the cluster and can forward client
|
||||||
requests to the appropriate node.
|
requests to the appropriate node.
|
||||||
|
@ -25,8 +23,8 @@ and dedicated {ml} nodes.
|
||||||
<<master-node,Master-eligible node>>::
|
<<master-node,Master-eligible node>>::
|
||||||
|
|
||||||
A node that has `node.master` set to `true` (default), which makes it eligible
|
A node that has `node.master` set to `true` (default), which makes it eligible
|
||||||
to be <<modules-discovery,elected as the _master_ node>>, which controls
|
to be <<modules-discovery,elected as the _master_ node>>, which controls the
|
||||||
the cluster.
|
cluster.
|
||||||
|
|
||||||
<<data-node,Data node>>::
|
<<data-node,Data node>>::
|
||||||
|
|
||||||
|
@ -47,7 +45,7 @@ A node that has `xpack.ml.enabled` and `node.ml` set to `true`, which is the
|
||||||
default behavior in the {es} {default-dist}. If you want to use {ml-features},
|
default behavior in the {es} {default-dist}. If you want to use {ml-features},
|
||||||
there must be at least one {ml} node in your cluster. For more information about
|
there must be at least one {ml} node in your cluster. For more information about
|
||||||
{ml-features}, see
|
{ml-features}, see
|
||||||
{ml-docs}/xpack-ml.html[Machine learning in the {stack}].
|
{ml-docs}/index.html[Machine learning in the {stack}].
|
||||||
+
|
+
|
||||||
IMPORTANT: If you use the {oss-dist}, do not set `node.ml`. Otherwise, the node
|
IMPORTANT: If you use the {oss-dist}, do not set `node.ml`. Otherwise, the node
|
||||||
fails to start.
|
fails to start.
|
||||||
|
@ -78,7 +76,7 @@ phase.
|
||||||
|
|
||||||
[float]
|
[float]
|
||||||
[[master-node]]
|
[[master-node]]
|
||||||
=== Master Eligible Node
|
=== Master-eligible node
|
||||||
|
|
||||||
The master node is responsible for lightweight cluster-wide actions such as
|
The master node is responsible for lightweight cluster-wide actions such as
|
||||||
creating or deleting an index, tracking which nodes are part of the cluster,
|
creating or deleting an index, tracking which nodes are part of the cluster,
|
||||||
|
@ -90,19 +88,25 @@ be elected to become the master node by the <<modules-discovery,master election
|
||||||
process>>.
|
process>>.
|
||||||
|
|
||||||
IMPORTANT: Master nodes must have access to the `data/` directory (just like
|
IMPORTANT: Master nodes must have access to the `data/` directory (just like
|
||||||
`data` nodes) as this is where the cluster state is persisted between node restarts.
|
`data` nodes) as this is where the cluster state is persisted between node
|
||||||
|
restarts.
|
||||||
|
|
||||||
Indexing and searching your data is CPU-, memory-, and I/O-intensive work
|
[float]
|
||||||
which can put pressure on a node's resources. To ensure that your master
|
[[dedicated-master-node]]
|
||||||
node is stable and not under pressure, it is a good idea in a bigger
|
==== Dedicated master-eligible node
|
||||||
cluster to split the roles between dedicated master-eligible nodes and
|
|
||||||
dedicated data nodes.
|
|
||||||
|
|
||||||
While master nodes can also behave as <<coordinating-node,coordinating nodes>>
|
It is important for the health of the cluster that the elected master node has
|
||||||
and route search and indexing requests from clients to data nodes, it is
|
the resources it needs to fulfil its responsibilities. If the elected master
|
||||||
better _not_ to use dedicated master nodes for this purpose. It is important
|
node is overloaded with other tasks then the cluster may not operate well. In
|
||||||
for the stability of the cluster that master-eligible nodes do as little work
|
particular, indexing and searching your data can be very resource-intensive, so
|
||||||
as possible.
|
in large or high-throughput clusters it is a good idea to avoid using the
|
||||||
|
master-eligible nodes for tasks such as indexing and searching. You can do this
|
||||||
|
by configuring three of your nodes to be dedicated master-eligible nodes.
|
||||||
|
Dedicated master-eligible nodes only have the `master` role, allowing them to
|
||||||
|
focus on managing the cluster. While master nodes can also behave as
|
||||||
|
<<coordinating-node,coordinating nodes>> and route search and indexing requests
|
||||||
|
from clients to data nodes, it is better _not_ to use dedicated master nodes for
|
||||||
|
this purpose.
|
||||||
|
|
||||||
To create a dedicated master-eligible node in the {default-dist}, set:
|
To create a dedicated master-eligible node in the {default-dist}, set:
|
||||||
|
|
||||||
|
@ -163,8 +167,8 @@ node.voting_only: true <1>
|
||||||
-------------------
|
-------------------
|
||||||
<1> The default for `node.voting_only` is `false`.
|
<1> The default for `node.voting_only` is `false`.
|
||||||
|
|
||||||
IMPORTANT: The `voting_only` role requires the {default-dist} of Elasticsearch
|
IMPORTANT: The `voting_only` role requires the {default-dist} of {es} and is not
|
||||||
and is not supported in the {oss-dist}. If you use the {oss-dist} and set
|
supported in the {oss-dist}. If you use the {oss-dist} and set
|
||||||
`node.voting_only` then the node will fail to start. Also note that only
|
`node.voting_only` then the node will fail to start. Also note that only
|
||||||
master-eligible nodes can be marked as voting-only.
|
master-eligible nodes can be marked as voting-only.
|
||||||
|
|
||||||
|
@ -212,8 +216,8 @@ nodes handle data related operations like CRUD, search, and aggregations.
|
||||||
These operations are I/O-, memory-, and CPU-intensive. It is important to
|
These operations are I/O-, memory-, and CPU-intensive. It is important to
|
||||||
monitor these resources and to add more data nodes if they are overloaded.
|
monitor these resources and to add more data nodes if they are overloaded.
|
||||||
|
|
||||||
The main benefit of having dedicated data nodes is the separation of the
|
The main benefit of having dedicated data nodes is the separation of the master
|
||||||
master and data roles.
|
and data roles.
|
||||||
|
|
||||||
To create a dedicated data node in the {default-dist}, set:
|
To create a dedicated data node in the {default-dist}, set:
|
||||||
[source,yaml]
|
[source,yaml]
|
||||||
|
@ -441,25 +445,27 @@ Like all node settings, it can also be specified on the command line as:
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
TIP: When using the `.zip` or `.tar.gz` distributions, the `path.data` setting
|
TIP: When using the `.zip` or `.tar.gz` distributions, the `path.data` setting
|
||||||
should be configured to locate the data directory outside the Elasticsearch
|
should be configured to locate the data directory outside the {es} home
|
||||||
home directory, so that the home directory can be deleted without deleting
|
directory, so that the home directory can be deleted without deleting your data!
|
||||||
your data! The RPM and Debian distributions do this for you already.
|
The RPM and Debian distributions do this for you already.
|
||||||
|
|
||||||
|
|
||||||
[float]
|
[float]
|
||||||
[[max-local-storage-nodes]]
|
[[max-local-storage-nodes]]
|
||||||
=== `node.max_local_storage_nodes`
|
=== `node.max_local_storage_nodes`
|
||||||
|
|
||||||
The <<data-path,data path>> can be shared by multiple nodes, even by nodes from different
|
The <<data-path,data path>> can be shared by multiple nodes, even by nodes from
|
||||||
clusters. It is recommended however to only run one node of Elasticsearch using the same data path.
|
different clusters. It is recommended however to only run one node of {es} using
|
||||||
This setting is deprecated in 7.x and will be removed in version 8.0.
|
the same data path. This setting is deprecated in 7.x and will be removed in
|
||||||
|
version 8.0.
|
||||||
|
|
||||||
By default, Elasticsearch is configured to prevent more than one node from sharing the same data
|
By default, {es} is configured to prevent more than one node from sharing the
|
||||||
path. To allow for more than one node (e.g., on your development machine), use the setting
|
same data path. To allow for more than one node (e.g., on your development
|
||||||
`node.max_local_storage_nodes` and set this to a positive integer larger than one.
|
machine), use the setting `node.max_local_storage_nodes` and set this to a
|
||||||
|
positive integer larger than one.
|
||||||
|
|
||||||
WARNING: Never run different node types (i.e. master, data) from the same data directory. This can
|
WARNING: Never run different node types (i.e. master, data) from the same data
|
||||||
lead to unexpected data loss.
|
directory. This can lead to unexpected data loss.
|
||||||
|
|
||||||
[float]
|
[float]
|
||||||
== Other node settings
|
== Other node settings
|
||||||
|
|
Loading…
Reference in New Issue