官术网_书友最值得收藏!

Setting up different node types (advanced)

ElasticSearch is a native designed for the cloud, so when you need to release a production environment with a huge number of records and you need high availability and good performance, you need to aggregate more nodes in a cluster.

ElasticSearch allows defining different types of nodes to balance and improve overall performances.

Getting ready

You need a working ElasticSearch installation.

How to do it...

For an advance cluster setup, there are some parameters that must be configured to define different node types. These parameters are in config/elasticsearch.yml and they can be set with the following steps:

  1. Setup if the node can be master or not:
    node.master: true
  2. Setup if a node must contain data or not:
    node.data: true

How it works...

The working of different nodes types is as follows:

  • node.master: This parameter defines that the node can become master for the cloud. The default value for this parameter is true.

    A master node is an arbiter for the cloud: it takes a decision about shard management, it keeps cluster status and it's the main controller of every index action.

  • node.data: This allows you to store data in the node. The default value for this parameter is true. This node will be a worker that indexes and searches data.

Mixing these two parameters, it's possible to have different node types:

The more frequently used node type is the first one, but if you have a very big cluster or special needs, you can differentiate the scopes of your nodes to better serve searches and aggregations.

主站蜘蛛池模板: 灵川县| 浦江县| 莒南县| 双鸭山市| 铁岭县| 灵璧县| 滨海县| 孟村| 庄河市| 勐海县| 昌邑市| 承德县| 苍梧县| 西吉县| 阿克| 湖北省| 偏关县| 广饶县| 武鸣县| 防城港市| 榆林市| 安泽县| 安龙县| 加查县| 富源县| 丰顺县| 罗甸县| 德令哈市| 肃北| 肃宁县| 兴安盟| 连云港市| 红河县| 玉龙| 崇左市| 喀喇| 开鲁县| 肥乡县| 北碚区| 南投市| 思南县|