主节点网关和其他节点网关在弹性搜索中有什么不同?他们都存储元数据,不是吗? [英] What different between Master node gateway and other node gateway in elasticsearch? Both of them store meta data, isn't it?

查看:117
本文介绍了主节点网关和其他节点网关在弹性搜索中有什么不同?他们都存储元数据,不是吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

主节点网关与弹性搜索中的其他节点网关之间有什么不同?他们都存储元数据,不是吗?
元数据,弹性搜索,我们可以从中获取什么信息?

解决方案

主节点与集群中的任何其他节点,除了已被选为主节点。



它负责协调任何群集范围的更改,例如添加或删除节点,创建,删除或更改状态(即打开/关闭)索引,以及分片到节点。发生任何这些更改时,群集状态由主机更新并发布到群集中的所有其他节点。它是唯一可以发布新的集群状态的节点。



主要执行的任务是轻量级的。处理数据(例如索引,搜索等)的任何任务都不需要涉及主机。如果您选择将主机作为非数据节点(即作为主机和路由器的节点,但不包含任何数据)运行,则主机可以在较小的盒子上快乐运行。



如果标记为主资格(默认情况下为所有节点),则允许一个节点成为主节点。如果当前的主站关闭,集群将选择一个新的主控。



集群中的一个重要的配置选项是 minimum_master_nodes 。这指定节点必须能够看到以便成为集群的一部分的主合格节点的数量。其目的是避免分裂大脑,即将集群分成两个集群,这两个集群都认为它们正常运行。



例如,如果你有3个节点,所有这些都是主资格的,并将 minimum_master_nodes 设置为1,那么如果第三个节点与另外两个节点分离,它仍然会看到一个主节点节点本身),并认为它可以自己形成一个集群。



相反,在这种情况下将 minimum_master_nodes 设置为2 (节点数/ 2 + 1),那么如果第三个节点分离,它将看不到足够的主节点,因此不会自己形成集群。



虽然Elasticsearch非常努力地选择正确的默认值,但是 minimum_master_nodes 是不可能猜到的,因为它无法知道你打算运行多少个节点。这是您必须自行配置的。


What different between Master node gateway and other node gateway in elasticsearch? Both of them store meta data, isn't it? Meta data, elasticsearch called, what information we can get from it?

解决方案

The master node is the same as any other node in the cluster, except that it has been elected to be the master.

It is responsible for coordinating any cluster-wide changes, such as the addition or removal of a node, creation, deletion or change of state (i.e. open/close) of an index, and the allocation of shards to nodes. When any of these changes occur, the "cluster state" is updated by the master and published to all other nodes in the cluster. It is the only node that may publish a new cluster state.

The tasks that a master performs are lightweight. Any tasks that deal with data (eg indexing, searching etc) do not need to involve the master. If you choose to run the master as a non-data node (ie a node that acts as master and as a router, but doesn't contain any data) then the master can run happily on a smallish box.

A node is allowed to become a master if it is marked as "master eligible" (which all nodes are by default). If the current master goes down, a new master will be elected by the cluster.

An important configuration option in your cluster is minimum_master_nodes. This specifies the number of "master eligible" nodes that a node must be able to see in order to be part of a cluster. Its purpose is to avoid "split brain" ie having the cluster separate into two clusters, both of which think that they are functioning correctly.

For instance, if you have 3 nodes, all of which are master eligible, and set minimum_master_nodes to 1, then if the third node is separated from the other two it, it still sees one master-eligible node (itself) and thinks that it can form a cluster by itself.

Instead, set minimum_master_nodes to 2 in this case (number of nodes / 2 + 1), then if the third node separates, it won't see enough master nodes, and thus won't form a cluster by itself. It will keep trying to join the original cluster.

While Elasticsearch tries very hard to choose the correct defaults, minimum_master_nodes is impossible to guess, as it has no way of knowing how many nodes you intend to run. This is something you must configure yourself.

这篇关于主节点网关和其他节点网关在弹性搜索中有什么不同?他们都存储元数据,不是吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆