elasticSearch node 的配置如下:

# Every node can be configured to allow or deny being eligible as the master,
# and to allow or deny to store the data.
#
# Allow this node to be eligible as a master node (enabled by default):
#
#node.master: true
#
# Allow this node to store data (enabled by default):
#
#node.data: true

# You can exploit these settings to design advanced cluster topologies.
#
# 1. You want this node to never become a master node, only to hold data.
# This will be the "workhorse" of your cluster.

#node.master: false
#node.data: true
#
# 2. You want this node to only serve as a master: to not store any data and
# to have free resources. This will be the "coordinator" of your cluster.
#
#node.master: true
#node.data: false
#
# 3. You want this node to be neither master nor data node, but
# to act as a "search load balancer" (fetching data from nodes,
# aggregating results, etc.)
#
#node.master: false
#node.data: false

node.master node.data                                      remark                             
true true default
true false coordinator
false true workhorse
false false search load balancer

对于Node的配置,还需要注意几点:

1.用来做请求分发和结果合并的节点如何配置?(search、fetching...)

2.不同类型的节点通信方式怎么配置比较合理?(Tcp、Http)

elasticsearch allows to configure a node to either be allowed to store data locally or not. Storing data locally basically means that shards of different indices are allowed to be allocated on that node. By default, each node is considered to be a data node, and it can be turned off by setting node.data to false.

This is a powerful setting allowing to simply create smart load balancers that take part in some of different API processing. Lets take an example:

We can start a whole cluster of data nodes which do not even start an HTTP transport by setting http.enabled to false. Such nodes will communicate with one another using the transportmodule. In front of the cluster we can start one or more "non data" nodes which will start with HTTP enabled. All HTTP communication will be performed through these "non data" nodes.

The benefit of using that is first the ability to create smart load balancers. These "non data" nodes are still part of the cluster, and they redirect operations exactly to the node that holds the relevant data. The other benefit is the fact that for scatter / gather based operations (such as search), these nodes will take part of the processing since they will start the scatter process, and perform the actual gather processing.

This relieves the data nodes to do the heavy duty of indexing and searching, without needing to process HTTP requests (parsing), overload the network, or perform the gather processing.

---

我们可以将整个机器分成两部分,data nodes和non data nodes。data nodes的通信协议采用tcp(http.enabled设置成false),主要负责搜索引擎的“运算”(indexing、searching)。non data nodes采用http进行通信,主要负责请求的分发(scatter)、结果的合并(gather)等。

如图:

ElasticSearch - Node的更多相关文章

  1. Docker + ElasticSearch + Node.js

    最近有空就想研究下ElasticSearch. 此篇文章用来记录研究过程.备注:需要有一定的docker基础,ElasticSearch的基本概念 Docker安装ElasticSearch 首先,就 ...

  2. elasticsearch中Node的创建

    要连接到集群,首先要告诉集群:你是谁,你有什么特征.在es中体现为实例化节点,elasticsearch通过org.elasticsearch.node.NodeBuilder的build()或者no ...

  3. elasticsearch failed to obtain node locks

    0x00 事件 重启服务器后,启动 elasticsearch 失败,在日志中观察到以下错误: [2019-10-25T17:29:54,639][WARN ][o.e.b.Elasticsearch ...

  4. jar hell & elasticsearch ik 版本问题

    想给es 安装一个ik 的插件, 我的es 是 2.4.0, 下载了一个版本是 1.9.5, [2016-10-09 16:56:26,248][INFO ][node ] [node-2] init ...

  5. ElasticSearch 5学习(3)——单台服务器部署多个节点

    一般情况下单台服务器只会部署一个ElasticSearch node,但是在学习过程中,很多情况下会需要实现ElasticSearch的分布式效果,所以需要启动多个节点,但是学习开发环境(不想开多个虚 ...

  6. Elasticsearch Configuration 中文版

    ##################### Elasticsearch Configuration Example ##################### # This file contains ...

  7. ElasticSearch的基本用法与集群搭建

    一.简介 ElasticSearch和Solr都是基于Lucene的搜索引擎,不过ElasticSearch天生支持分布式,而Solr是4.0版本后的SolrCloud才是分布式版本,Solr的分布式 ...

  8. 亿级规模的Elasticsearch优化实战

    Elasticsearch 的基本信息大致如图所示,这里就不具体介绍了. 本次分享主要包含两个方面的实战经验:索引性能和查询性能. 一. 索引性能(Index Performance) 首先要考虑的是 ...

  9. ElasticSearch基本学习

    ES介绍 维基百科使用Elasticsearch来进行全文搜做并高亮显示关键词,以及提供search-as-you-type.did-you-mean等搜索建议功能. 英国卫报使用Elasticsea ...

随机推荐

  1. 洛谷P2051 中国象棋(dp)

    题目链接:传送门 题目大意: 在N行M列的棋盘中放象棋中的“炮”,问要使得“炮”两两互不伤害,有多少种放法. 1 ≤ n,m ≤ 100,答案对9999973取模. 思路: 按行更新答案.每行炮可以放 ...

  2. 如何用input标签上传多个图片并回显

    本文主要记录如何用input标签和jquery实现多图片的上传和回显,不会涉及后端的交互,大概的效果看图 我们从零来做一个这样的demo 第一步: 我们先完善一下我们的页面,默认的input-file ...

  3. 阮一峰关于reduce 和transduce的博客

    http://www.ruanyifeng.com/blog/2017/03/reduce_transduce.html

  4. mariaDB的安装 apache的安装

    1.mariaDB的安装: 下载安装包: wget -c https://downloads.mariadb.com/MariaDB/mariadb-10.3.6/bintar-linux-glibc ...

  5. 【HDOJ1811】【并查集预处理+拓扑排序】

    http://acm.hdu.edu.cn/showproblem.php?pid=1811 Rank of Tetris Time Limit: 1000/1000 MS (Java/Others) ...

  6. js判断是否是闰年

    JavaScript判断值是否是闰年: 判断是否闰年公式:(year%4==0 && year%100 !=0) ||(year%400 ==0) var year = prompt( ...

  7. airflow-operator 可以管理airflow 的kuberntes 自定义controller && crd

    使用airflow-operator 我们可以让airflow 可以很方便的运行在k8s集群环境中,当前还在开发中 主要分为两部分:airflowbbase && airfowclus ...

  8. IT痴汉的工作现状11-程序猿的烦恼

    版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/lincyang/article/details/25535181         痴汉们事实上是非常 ...

  9. 数据格式转换(一)PDF转换技术

         PDF(Portable Document Format)文件格式是Adobe公司开发的电子文件格式. 这样的文件格式与操作系统平台无关.这一特点使它成为在Internet上进行电子文档发行 ...

  10. css 如何实现图片等比例缩放

    在进行布局的时候,很多PM都要求图片等比例缩放,而且要求图片不失真,不变形,但是UI设计好了这个div的宽度又不能随意更改,而后台传过来的图片也不是等比例的图片,这就比较难受了,写成 width: 1 ...