Elasticsearch master slave cofiguration Elasticsearch master slave cofiguration elasticsearch elasticsearch

Elasticsearch master slave cofiguration


All nodes are eligible become master or data nodes by default. One node can be a master node and a data node in the same time. However, there many advantages to split master role and data role from a node. In a big Elasticsearch cluster, since the stable master nodes are important for the healthy cluster, people would like to keep master nodes away from indexing and searching pressure, assign dedicated servers as master nodes.

Master nodes are responsible for creating or deleting an index, tracking which nodes are part of the cluster, and deciding which shards to allocate to which nodes. You can configure a node as a master eligible node by setting:

node.master: true node.data: false node.ingest: false 

Data nodes are in response for holding data, indexing and searching. These operations are I/O-, memory-, and CPU-intensive. You can configure a node as a data eligible node by setting:

node.master: false node.data: true node.ingest: false

Further, there is a dedicated coordinating node, which only routes requests to data nodes and doesn’t have to handle master’s duties, just works like a load balancer. You can configure a node as a coordinating node by settings:

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

The distributed nature of Elasticsearch are suitable for Hadoop parallel computing. Hadoop can leverage the shards provided by Elasticsearch to get the required data efficiently.

Elasticsearch node types and configuration for further reference: https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-node.html