# How to allocate ES data shards among 20 es data nodes effectively?

**URL:** <https://discuss.elastic.co/t/how-to-allocate-es-data-shards-among-20-es-data-nodes-effectively/101619>\
**Category:** Elasticsearch\
**Created:** [September 25, 2017, 2:32am UTC](https://discuss.elastic.co/t/how-to-allocate-es-data-shards-among-20-es-data-nodes-effectively/101619 "2017-09-25T02:32:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robin\_Guo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/robin_guo/32/42297_2.png) [@Robin\_Guo](https://discuss.elastic.co/u/Robin_Guo)\
**Post date:** [September 25, 2017, 2:32am UTC](https://discuss.elastic.co/t/how-to-allocate-es-data-shards-among-20-es-data-nodes-effectively/101619/1 "2017-09-25T02:32:03Z")

</div>

Dear folks,

Current we have **total 26 nodes** in an ES cluster, **3 masters, and 2 clients, 20 data node**.  
We have **_16 cores,32GM mem, HDD raid5 4.6T, 1000Mbps NIC for each server of es data nodes_**.  
We want to store all indexes among all data nodes In order to make better use of all server computing performance and save data for a long time.

My question is that what's the best sharding solution among the **all 20 es data nodes**? ( **also allow 1 or 2 data nodes can be down** in terms of  
network/hard etc failure)..

```
20 primary shards, 1 replicas
10 primary shards, 2 replicas.
19 primary shards, 1 replicas

```

Any good suggestions are appreciated!!!

Regards

Robin

---

<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:** [September 25, 2017, 2:58am UTC](https://discuss.elastic.co/t/how-to-allocate-es-data-shards-among-20-es-data-nodes-effectively/101619/2 "2017-09-25T02:58:42Z")

</div>

10 primaries with 1 replica set would mean 1 shard per node, which is pretty evenly distributed.

Though if your shards are small it may be a bit of a waste.

---

<div class="post-metadata">

**Author:** ![Robin\_Guo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/robin_guo/32/42297_2.png) [@Robin\_Guo](https://discuss.elastic.co/u/Robin_Guo)\
**Post date:** [September 25, 2017, 3:21am UTC](https://discuss.elastic.co/t/how-to-allocate-es-data-shards-among-20-es-data-nodes-effectively/101619/3 "2017-09-25T03:21:13Z")

</div>

Dear @warkolm

seems with 10 primaries and 1 replica, We just have a half-disk space utilization of whole es data nodes.  
If we total have 100TB space within 20 ES nodes, which is we just can use 50TB for the primary shard, and rest of disk space for replicas. but the problem is that probably our indexes over 50 TB a year.

what about 20 primaries and 1 replica per index?

Thanks

---

<div class="post-metadata">

**Author:** ![Robin\_Guo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/robin_guo/32/42297_2.png) [@Robin\_Guo](https://discuss.elastic.co/u/Robin_Guo)\
**Post date:** [September 25, 2017, 3:38am UTC](https://discuss.elastic.co/t/how-to-allocate-es-data-shards-among-20-es-data-nodes-effectively/101619/4 "2017-09-25T03:38:12Z")

</div>

Any suggestions?

Regards

---

<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:** [September 25, 2017, 5:41am UTC](https://discuss.elastic.co/t/how-to-allocate-es-data-shards-among-20-es-data-nodes-effectively/101619/5 "2017-09-25T05:41:34Z")

</div>

The sharding scheme depends on the use case, so more details about your type of data and expected volumes would help? Will you be using [time-based indices](https://www.elastic.co/guide/en/elasticsearch/guide/2.x/time-based.html)? If so, have you read [this blog post about sharding practices](https://www.elastic.co/blog/how-many-shards-should-i-have-in-my-elasticsearch-cluster)?

---

<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:** [October 23, 2017, 5:41am UTC](https://discuss.elastic.co/t/how-to-allocate-es-data-shards-among-20-es-data-nodes-effectively/101619/6 "2017-10-23T05:41:42Z")

</div>

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