Elasticsearch节点介绍

Node

Any time that you start an instance of Elasticsearch, you are starting a node. A collection of connected nodes is called a cluster. If you are running a single node of Elasticsearch, then you have a cluster of one node.

每次启动Elasticsearch实例时,都会启动一个节点。连接节点的集合称为集群。如果您正在运行Elasticsearch的单个节点,那么您将拥有一个节点的集群。

Every node in the cluster can handle HTTP and Transport traffic by default. The transport layer is used exclusively for communication between nodes and the Java TransportClient; the HTTP layer is used only by external REST clients.

默认情况下,群集中的每个节点都可以处理HTTP和传输流量。传输层专门用于节点和Java TransportClient之间的通信; HTTP层仅由外部REST客户端使用。

All nodes know about all the other nodes in the cluster and can forward client requests to the appropriate node. Besides that, each node serves one or more purpose:

所有节点都知道集群中的所有其他节点,并且可以将客户端请求转发到适当的节点。除此之外,每个节点都有一个或多个目的:
符合主节点的节点

Master-eligible node

有选举资格的节点

A node that has node.master set to true (default), which makes it eligible to be elected as the master node, which controls the cluster.

将节点的node.master设置为true(默认),该节点就有资格被选为控制集群的主节点。

Data node

数据节点

A node that has node.data set to true (default). Data nodes hold data and perform data related operations such as CRUD, search, and aggregations.

数据节点的node.data被设置为true(默认值)。数据节点保存数据并执行与数据相关的操作,例如CRUD,搜索和聚合。

Ingest node

摄取节点

 

A node that has node.ingest set to true (default). Ingest nodes are able to apply an ingest pipeline to a document in order to transform and enrich the document before indexing. With a heavy ingest load, it makes sense to use dedicated ingest nodes and to mark the master and data nodes as node.ingest: false.

摄取节点的node.ingest被设置为true(默认值)。摄取节点能够将摄取管道应用于文档,以便在编制索引之前转换和丰富文档。在摄取负载较大情况下,使用专用的摄取节点并将主节点和数据节点标记为node.ingest:false是有意义的。

Tribe node

部落节点

A tribe node, configured via the tribe.* settings, is a special type of coordinating only node that can connect to multiple clusters and perform search and other operations across all connected clusters.

部落节点通过 tribe.* settings进行配置。部落节点是一种特殊类型的仅用于协调的节点,可以连接到多个集群并在所有连接的集群中执行搜索和其他操作。

By default a node is a master-eligible node and a data node, plus it can pre-process documents through ingest pipelines. This is very convenient for small clusters but, as the cluster grows, it becomes important to consider separating dedicated master-eligible nodes from dedicated data nodes.

默认情况下,节点是有选举资格的节点和数据节点,此外它还可以通过摄取管道预处理文档。这对于小型集群非常方便,但随着集群的增长,考虑将专用的有选举资格的节点与专用数据节点分开变得很重要。

----------------------------------------------------------------------------------------------------------------------------------------

coordinating node

协调节点

Requests like search requests or bulk-indexing requests may involve data held on different data nodes. A search request, for example, is executed in two phases which are coordinated by the node which receives the client request — the coordinating node.

诸如搜索请求或批量索引请求之类的请求可能涉及保存在不同数据节点上的数据。 例如,搜索请求在两个阶段中执行,这两个阶段由接收客户端请求的节点 - 协调节点协调。

In the scatter phase, the coordinating node forwards the request to the data nodes which hold the data. Each data node executes the request locally and returns its results to the coordinating node. In the gather phase, the coordinating node reduces each data node’s results into a single global resultset.

在分散阶段,协调节点将请求转发到保存数据的数据节点。 每个数据节点在本地执行请求并将其结果返回给协调节点。 在收集阶段,协调节点将每个数据节点的结果减少为单个全局结果集。

Every node is implicitly a coordinating node. This means that a node that has all three node.master, node.data and node.ingest set to false will only act as a coordinating node, which cannot be disabled. As a result, such a node needs to have enough memory and CPU in order to deal with the gather phase.

每个节点都隐式地是一个协调节点。 这意味着将所有三个node.master,node.data和node.ingest设置为false的节点仅用作协调节点,且无法禁用该节点。 因此,这样的节点需要具有足够的存储器和CPU以便处理收集阶段。

master-eligible node

有选举资格的节点

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, and deciding which shards to allocate to which nodes. It is important for cluster health to have a stable master node.

主节点负责轻量级群集范围的操作,例如创建或删除索引,跟踪哪些节点是群集的一部分,以及决定将哪些分片分配给哪些节点。 拥有稳定的主节点对集群运行的健康状况非常重要。
Any master-eligible node (all nodes by default) may be elected to become the master node by the master election process.

可以通过主节点选举选择任何有选举资格的节点(默认情况下所有节点)成为主节点。

Indexing and searching your data is CPU-, memory-, and I/O-intensive work which can put pressure on a node’s resources. To ensure that your master node is stable and not under pressure, it is a good idea in a bigger cluster to split the roles between dedicated master-eligible nodes and dedicated data nodes.

索引和搜索数据是CPU,内存和I / O密集型工作,可能会对节点资源造成压力。 为确保主节点稳定且不受压力,在较大的群集中最好分割专用主节点和专用数据节点之间的角色。
While master nodes can also behave as 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. It is important for the stability of the cluster that master-eligible nodes do as little work as possible.

虽然主节点也可以表现为协调节点并将搜索和索引请求从客户端转发到数据节点,但最好不要将专用主节点用于此目的。 对于集群的稳定性而言,符合主节点的节点尽可能少地工作是很重要的。
To create a dedicated master-eligible node, set:

要创建专用的符合主节点的节点,请设置:

node.master: true node.data: false node.ingest: false cluster.remote.connect: false

The node.master role is enabled by default.

Disable the node.data role (enabled by default).

Disable the node.ingest role (enabled by default).

Disable cross-cluster search (enabled by default).

Data node

数据节点

Data nodes hold the shards that contain the documents you have indexed. Data nodes handle data related operations like CRUD, search, and aggregations. 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.

数据节点存储包含已编制索引的文档的分片。 数据节点处理与数据相关的操作,如CRUD(增删改查),搜索和聚合。 这些操作是I / O-,内存和CPU密集型的。 监视这些资源并在超载时添加更多数据节点非常重要。

The main benefit of having dedicated data nodes is the separation of the master and data roles.

拥有专用数据节点的主要好处是分离主角色和数据角色。

To create a dedicated data node, set:

要创建专用数据节点,请设置:

node.master: false node.data: true node.ingest: false cluster.remote.connect: false

Disable the node.master role (enabled by default).

The node.data role is enabled by default.

Disable the node.ingest role (enabled by default).

Disable cross-cluster search (enabled by default).

Ingest node

Ingest nodes can execute pre-processing pipelines, composed of one or more ingest processors. Depending on the type of operations performed by the ingest processors and the required resources, it may make sense to have dedicated ingest nodes, that will only perform this specific task.

摄取节点可以执行由一个或多个摄取处理器组成的预处理流水线。 根据摄取处理器执行的操作类型和所需资源,具有专用摄取节点可能是有意义的,这些节点仅执行此特定任务。

To create a dedicated ingest node, set:

要创建专用的摄取节点,请设置:

node.master: false node.data: false node.ingest: true cluster.remote.connect: false

Disable the node.master role (enabled by default).

Disable the node.data role (enabled by default).

The node.ingest role is enabled by default.

Disable cross-cluster search (enabled by default).

Coordinating only node

If you take away the ability to be able to handle master duties, to hold data, and pre-process documents, then you are left with a coordinating node that can only route requests, handle the search reduce phase, and distribute bulk indexing. Essentially, coordinating only nodes behave as smart load balancers.

如果您剥夺了处理主要职责,保存数据和预处理文档的能力,那么您设置了一个协调节点,该节点只能转发请求,处理搜索减少阶段和分发批量索引。 实质上,仅协调节点就像智能负载平衡器一样。

Coordinating only nodes can benefit large clusters by offloading the coordinating node role from data and master-eligible nodes. They join the cluster and receive the full cluster state, like every other node, and they use the cluster state to route requests directly to the appropriate place(s).

通过在数据节点和有选举资格的节点上卸载协调节点角色,仅协调节点可以使大型群集受益。 它们加入群集并像其他每个节点一样接收完整的群集状态,并使用群集状态将请求直接转发到适当的位置。

To create a dedicated coordinating node, set:

要创建专用协调节点,请设置:

node.master: false node.data: false node.ingest: false cluster.remote.connect: false

Disable the node.master role (enabled by default).

Disable the node.data role (enabled by default).

Disable the node.ingest role (enabled by default).

Disable cross-cluster search (enabled by default).

 

英文指南出处:https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html#node-ingest-node

翻译:wuyang

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值