# Ideal number of shards for 2 node ES cluster

**URL:** <https://discuss.elastic.co/t/ideal-number-of-shards-for-2-node-es-cluster/221063>\
**Category:** Elasticsearch\
**Created:** [February 26, 2020, 3:09pm UTC](https://discuss.elastic.co/t/ideal-number-of-shards-for-2-node-es-cluster/221063 "2020-02-26T15:09:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nityaraj06](https://avatars.discourse-cdn.com/v4/letter/n/d78d45/32.png) [@nityaraj06](https://discuss.elastic.co/u/nityaraj06)\
**Post date:** [February 26, 2020, 3:09pm UTC](https://discuss.elastic.co/t/ideal-number-of-shards-for-2-node-es-cluster/221063/1 "2020-02-26T15:09:47Z")

</div>

Could someone pls suggest me the number of shards and replicas for a 2 node elasticsearch cluster. Thank you!

I am fully aware that the ideal setup is of 3 nodes but I would like to try with 2 nodes first before moving ahead.

---

<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:** [February 26, 2020, 5:58pm UTC](https://discuss.elastic.co/t/ideal-number-of-shards-for-2-node-es-cluster/221063/2 "2020-02-26T17:58:02Z")

</div>

That typically depends on the use case and expected load, so please provide some additional details. Having one replica is however recommended so that both nodes hold a full copy of the data.

---

<div class="post-metadata">

**Author:** ![nityaraj06](https://avatars.discourse-cdn.com/v4/letter/n/d78d45/32.png) [@nityaraj06](https://discuss.elastic.co/u/nityaraj06)\
**Post date:** [February 27, 2020, 5:21am UTC](https://discuss.elastic.co/t/ideal-number-of-shards-for-2-node-es-cluster/221063/3 "2020-02-27T05:21:43Z")

</div>

The log files I plan to analyse are mostly under 1gb per month, ~12gb per year, the files are constantly written to as well. Also i have 2 environments - dev and test each containing around 12-15 servers, so does the following make sense?  
dev =\> primary on node1, replica on node2, test =\> primary on node2, replica on node1. So i will configure logstash to send logs to node1 for dev servers and node2 for test servers.

---

<div class="post-metadata">

**Author:** ![KellyK313](https://avatars.discourse-cdn.com/v4/letter/k/13edae/32.png) [@KellyK313](https://discuss.elastic.co/u/KellyK313)\
**Post date:** [February 27, 2020, 8:00am UTC](https://discuss.elastic.co/t/ideal-number-of-shards-for-2-node-es-cluster/221063/4 "2020-02-27T08:00:33Z")

</div>

2 primary shard and 1 replicated (2 \* 2 total) shard is enough.

---

<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:** [March 26, 2020, 8:00am UTC](https://discuss.elastic.co/t/ideal-number-of-shards-for-2-node-es-cluster/221063/5 "2020-03-26T08:00:34Z")

</div>

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