# Smart rebalancing over date based indices

**URL:** <https://discuss.elastic.co/t/smart-rebalancing-over-date-based-indices/152413>\
**Category:** Elasticsearch\
**Created:** [October 14, 2018, 10:04pm UTC](https://discuss.elastic.co/t/smart-rebalancing-over-date-based-indices/152413 "2018-10-14T22:04:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![idanhagai](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/idanhagai/32/16175_2.png) [@idanhagai](https://discuss.elastic.co/u/idanhagai)\
**Post date:** [October 14, 2018, 10:04pm UTC](https://discuss.elastic.co/t/smart-rebalancing-over-date-based-indices/152413/1 "2018-10-14T22:04:01Z")

</div>

ES 5.2

2 types of date based indices (e.g X-2018-10-10, y-2018-10-10)  
20 shards per index.  
30 indices from each index type (with 1 replica)  
50 nodes.

Any suggestions how to spread all shards for best performance ?  
For example, right now I have a few nodes with 5 shards from the same index.  
Any idea how to avoid this behaviour ?

Best,  
Idan

---

<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:** [October 15, 2018, 5:49am UTC](https://discuss.elastic.co/t/smart-rebalancing-over-date-based-indices/152413/2 "2018-10-15T05:49:10Z")

</div>

As you have less shards than nodes for each index, you may be able to use the [index.routing.allocation.total\_shards\_per\_node](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/allocation-total-shards.html#allocation-total-shards) setting to get a more even distribution.

---

<div class="post-metadata">

**Author:** ![idanhagai](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/idanhagai/32/16175_2.png) [@idanhagai](https://discuss.elastic.co/u/idanhagai)\
**Post date:** [October 15, 2018, 8:28am UTC](https://discuss.elastic.co/t/smart-rebalancing-over-date-based-indices/152413/3 "2018-10-15T08:28:14Z")

</div>

Thanks !!!

---

<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:** [November 12, 2018, 8:28am UTC](https://discuss.elastic.co/t/smart-rebalancing-over-date-based-indices/152413/4 "2018-11-12T08:28:15Z")

</div>

Closed on November 12, 2018, 8:28am UTC

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