# Elasticsearch \[6.8\] Shard distribution based on traffic

**URL:** <https://discuss.elastic.co/t/elasticsearch-6-8-shard-distribution-based-on-traffic/315422>\
**Category:** Elasticsearch\
**Created:** [September 29, 2022, 4:36am UTC](https://discuss.elastic.co/t/elasticsearch-6-8-shard-distribution-based-on-traffic/315422 "2022-09-29T04:36:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![srivatsa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/srivatsa/32/111417_2.png) [@srivatsa](https://discuss.elastic.co/u/srivatsa)\
**Post date:** [September 29, 2022, 4:36am UTC](https://discuss.elastic.co/t/elasticsearch-6-8-shard-distribution-based-on-traffic/315422/1 "2022-09-29T04:36:23Z")

</div>

Hi Folks,  
We are seeing scenarios where the cluster is allocating 6 -10 shards(primaries & replicas) of an index with shard sizes around 50GB on a single node of the cluster even though all nodes in the cluster are of the same configuration. This behavior is causing issues when we have a high throughput of writes on that index coming in & the load is on that node which is housing these large shards on it & at times results in thread\_pools maxing out & we encounter rejections

Want to understand what is the logic behind this behavior & is there any allocation algo that distributes the shards based on traffic ? so that the shard gets allocated to avoid the above mentioned scenario.

---

<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 29, 2022, 5:32am UTC](https://discuss.elastic.co/t/elasticsearch-6-8-shard-distribution-based-on-traffic/315422/2 "2022-09-29T05:32:37Z")

</div>

Allocation of shards is largely driven by shard count. You can ensure a more even distribution by setting [index.routing.allocation.total\_shards\_per\_node](https://www.elastic.co/guide/en/elasticsearch/reference/6.8/allocation-total-shards.html) in your index template. Make sure to set this so that the cluster has the ability to relocate shards in case of node failure.

Also be aware that version 6.8 is EOL, so I would recommend you upgrade to a newer version.

---

<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 27, 2022, 5:32am UTC](https://discuss.elastic.co/t/elasticsearch-6-8-shard-distribution-based-on-traffic/315422/3 "2022-10-27T05:32:47Z")

</div>

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