# Creating a master node and data node

**URL:** <https://discuss.elastic.co/t/creating-a-master-node-and-data-node/79701>\
**Category:** Elasticsearch\
**Created:** [March 23, 2017, 8:15am UTC](https://discuss.elastic.co/t/creating-a-master-node-and-data-node/79701 "2017-03-23T08:15:43Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomer](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomer](https://discuss.elastic.co/u/tomer)\
**Post date:** [March 23, 2017, 8:15am UTC](https://discuss.elastic.co/t/creating-a-master-node-and-data-node/79701/1 "2017-03-23T08:15:43Z")

</div>

Hi,

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)](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html)

In the manual It is written that:

> To create a standalone master-eligible node, set:

> node.master: true  
> node.data: 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?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 23, 2017, 9:02am UTC](https://discuss.elastic.co/t/creating-a-master-node-and-data-node/79701/2 "2017-03-23T09:02:07Z")

</div>

> [@tomer](#):
>
> elasticsearch.yml

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

> [@tomer](#):
>
> I didnt understand from this exactly what a node is.

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

---

<div class="post-metadata">

**Author:** ![tomer](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomer](https://discuss.elastic.co/u/tomer)\
**Post date:** [March 23, 2017, 9:03am UTC](https://discuss.elastic.co/t/creating-a-master-node-and-data-node/79701/3 "2017-03-23T09:03:12Z")

</div>

Thanks!

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 23, 2017, 9:04am UTC](https://discuss.elastic.co/t/creating-a-master-node-and-data-node/79701/4 "2017-03-23T09:04:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tomer](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomer](https://discuss.elastic.co/u/tomer)\
**Post date:** [March 23, 2017, 9:08am UTC](https://discuss.elastic.co/t/creating-a-master-node-and-data-node/79701/5 "2017-03-23T09:08:55Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 23, 2017, 9:18am UTC](https://discuss.elastic.co/t/creating-a-master-node-and-data-node/79701/6 "2017-03-23T09:18:42Z")

</div>

How many hosts are you looking to use for your cluster? The configuration parameters you need to look at are described [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html).

---

<div class="post-metadata">

**Author:** ![tomer](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomer](https://discuss.elastic.co/u/tomer)\
**Post date:** [March 23, 2017, 9:21am UTC](https://discuss.elastic.co/t/creating-a-master-node-and-data-node/79701/7 "2017-03-23T09:21:36Z")

</div>

Thanks!  
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

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 23, 2017, 9:27am UTC](https://discuss.elastic.co/t/creating-a-master-node-and-data-node/79701/8 "2017-03-23T09:27:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tomer](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomer](https://discuss.elastic.co/u/tomer)\
**Post date:** [March 23, 2017, 12:17pm UTC](https://discuss.elastic.co/t/creating-a-master-node-and-data-node/79701/9 "2017-03-23T12:17:07Z")

</div>

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

> node.master: true  
> node.data: 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

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 23, 2017, 12:27pm UTC](https://discuss.elastic.co/t/creating-a-master-node-and-data-node/79701/10 "2017-03-23T12:27:14Z")

</div>

[Install Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html) 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](https://www.elastic.co/guide/en/elasticsearch/reference/5.2/bootstrap-checks.html).

---

<div class="post-metadata">

**Author:** ![tomer](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomer](https://discuss.elastic.co/u/tomer)\
**Post date:** [March 23, 2017, 12:36pm UTC](https://discuss.elastic.co/t/creating-a-master-node-and-data-node/79701/11 "2017-03-23T12:36:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 20, 2017, 12:36pm UTC](https://discuss.elastic.co/t/creating-a-master-node-and-data-node/79701/12 "2017-04-20T12:36:40Z")

</div>

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