# Few queries pertaining to elasticsearch cluster

**URL:** <https://discuss.elastic.co/t/few-queries-pertaining-to-elasticsearch-cluster/176321>\
**Category:** Elasticsearch\
**Created:** [April 11, 2019, 5:37am UTC](https://discuss.elastic.co/t/few-queries-pertaining-to-elasticsearch-cluster/176321 "2019-04-11T05:37:35Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blason](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/blason/32/42284_2.png) [@Blason](https://discuss.elastic.co/u/Blason)\
**Post date:** [April 11, 2019, 5:37am UTC](https://discuss.elastic.co/t/few-queries-pertaining-to-elasticsearch-cluster/176321/1 "2019-04-11T05:37:36Z")

</div>

Hi Team,

I am trying to build my first cluster on elasticsearch and I do have few queries regarding the same.

My retention period will be around 6-8 months  
I am thinking of 2 elastic nodes  
So in a cluster, per my understanding, I need at least one master node and one data node. since I am planning to use 2 nodes. Can I make both one node as  
master and data while other as data only?

OR both the nodes as master and data? OR I need to have 3 nodes only to make a complete cluster?

For me, data redundancy is primary hence would really appreciate if someone can help me on this?

TIA

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 11, 2019, 7:44am UTC](https://discuss.elastic.co/t/few-queries-pertaining-to-elasticsearch-cluster/176321/2 "2019-04-11T07:44:28Z")

</div>

> [@Blason](#):
>
> For me, data redundancy is primary hence would really appreciate if someone can help me on this?

You need three master-eligible nodes and two data nodes in order to achieve redundancy. Each node can be both a data node and a master-eligible node (that's the default) so this means the smallest resilient cluster contains three nodes: two mixed master-data nodes and one dedicated master node. You can theoretically make the dedicated master node smaller and cheaper than the two data nodes as long as you do not send it any indexing or search traffic, but in practice it's often simpler to have three identical mixed data/master nodes.

---

<div class="post-metadata">

**Author:** ![Blason](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/blason/32/42284_2.png) [@Blason](https://discuss.elastic.co/u/Blason)\
**Post date:** [April 11, 2019, 11:03am UTC](https://discuss.elastic.co/t/few-queries-pertaining-to-elasticsearch-cluster/176321/3 "2019-04-11T11:03:33Z")

</div>

Thanks man!! and appreciate your quick turn around. So my config would be -

Node 1-:  
node.master: true  
node.data: false

Node-2 -:  
node.master: true  
node.data: true

Node-3  
node.master: true  
node.data:true

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 11, 2019, 11:19am UTC](https://discuss.elastic.co/t/few-queries-pertaining-to-elasticsearch-cluster/176321/4 "2019-04-11T11:19:40Z")

</div>

Yep (don't forget to set `discovery.zen.minimum_master_nodes` too, in versions prior to 7.0.0).

---

<div class="post-metadata">

**Author:** ![Blason](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/blason/32/42284_2.png) [@Blason](https://discuss.elastic.co/u/Blason)\
**Post date:** [April 11, 2019, 11:22am UTC](https://discuss.elastic.co/t/few-queries-pertaining-to-elasticsearch-cluster/176321/5 "2019-04-11T11:22:06Z")

</div>

That is 3?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 11, 2019, 11:23am UTC](https://discuss.elastic.co/t/few-queries-pertaining-to-elasticsearch-cluster/176321/6 "2019-04-11T11:23:36Z")

</div>

[It should be 2 if you have 3 master-eligible nodes](https://www.elastic.co/guide/en/elasticsearch/reference/6.7/discovery-settings.html#minimum_master_nodes).

---

<div class="post-metadata">

**Author:** ![Blason](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/blason/32/42284_2.png) [@Blason](https://discuss.elastic.co/u/Blason)\
**Post date:** [May 6, 2019, 3:29am UTC](https://discuss.elastic.co/t/few-queries-pertaining-to-elasticsearch-cluster/176321/7 "2019-05-06T03:29:09Z")

</div>

One further step is to connect Kibana to my cluster; can someone please confirm if below config is valid?

ES - 3 nodes  
Kibana/ES - On same node  
########

ES1  
cluster.name: my-cluster  
node.master: true  
node.data: false  
discovery.zen.minimum\_master\_nodes: 2

ES2  
cluster.name: my-cluster  
node.master: true  
node.data: true  
discovery.zen.minimum\_master\_nodes: 2

ES3  
cluster.name: my-cluster  
node.master: true  
node.data: true  
discovery.zen.minimum\_master\_nodes: 2

ES/Kibana 4  
cluster.name: my-cluster  
node.master: false  
node.data: false  
node.ingest: false  
discovery.zen.minimum\_master\_nodes: 2

* * *

kibana.yml  
elasticsearch.hosts: ["[http://localhost:9200](http://localhost:9200)"]

---

<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:** [June 3, 2019, 3:43am UTC](https://discuss.elastic.co/t/few-queries-pertaining-to-elasticsearch-cluster/176321/8 "2019-06-03T03:43:22Z")

</div>

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