Creating a master node and data node


Reading the manual I am still uncertain how to make a node as master node and how to make a node as data node
(here is the manual I used)

In the manual It is written that:

To create a standalone master-eligible node, set:

node.master: true false
node.ingest: false

Where do I write this? I didnt find something like this in elasticsearch.yml

  • Also there is a brief explanation in the same guide to what is a "node":

Any time that you start an instance of Elasticsearch, you are starting a node

I didnt understand from this exactly what a node is. From my understanding cluster is a bunch of nodes and a node is a bunch if indices and the logs/data flows to the indices. Is this true?

That is the place to do it. If it's not there, then just add it.

A node is just a single java process that is running the ES binary.

1 Like


For small clusters not under heavy load there may not be any need for dedicated master nodes. When starting out with a small cluster, it is generally sufficient to set up 3 nodes where all nodes are master eligible and also hold data, which is the default configuration. Having 3 nodes in the cluster will give you high availability as the two remaining nodes will be able to make a majority decision to elect a new master if the current master was to disappear (through crash, network partition or excessive GC).

The cluster as a whole holds indices and data. If nodes crash, the cluster will redistribute the data automatically to try to ensure all primary and replica shards are assigned.


Thanks @Christian_Dahlqvist I probably will have a heavy load on my Cluster. Therefor should I create more nodes? Also how do I create a few nodes?

How many hosts are you looking to use for your cluster? The configuration parameters you need to look at are described here.

1 Like

I will look there.
I believe there will be about 12 machines (4 of them will be heavy duty) emitting logs through filebeat/logstash to the elasticsearch

Set up 3 dedicated master nodes. These do not do a lot of work, so do not need to be very powerful, but are essential for cluster stability. Requests should be routed directly to the data nodes.

1 Like

How do I set up extra nodes? I know that after doing so I just need to add to it:

node.master: true false

but I just dont know how to do it

From my understanding for every cluster there could be multiple nodes but I don't know how to add nodes

Install Elasticsearch on each of the hosts that are to make up the cluster. Locate the elasticsearch.yml file (location depends on how you install Elasticsearch) and update the settings I linked to. As you are connecting nodes distributed across multiple hosts, make sure that you pay attention to the bootstrap checks.

1 Like

First of all thank you a lot!
I am getting a much better understanding of the subject thanks to you!

Just to make sure, basically when the manual says:
On one ES there can be one node, but when there are extra ES each one of them have a node and we can connect them all together

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.