# Context aware shard distribution across nodes

**URL:** <https://discuss.elastic.co/t/context-aware-shard-distribution-across-nodes/100957>\
**Category:** Elasticsearch\
**Created:** [September 19, 2017, 4:58am UTC](https://discuss.elastic.co/t/context-aware-shard-distribution-across-nodes/100957 "2017-09-19T04:58:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tanner-bruce](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tanner-bruce/32/21903_2.png) [@tanner-bruce](https://discuss.elastic.co/u/tanner-bruce)\
**Post date:** [September 19, 2017, 4:58am UTC](https://discuss.elastic.co/t/context-aware-shard-distribution-across-nodes/100957/1 "2017-09-19T04:58:34Z")

</div>

Hello,

I have a number of indices where I would like elasticsearch to disperse the shards across all data nodes as much as possible. Is this possible?

---

<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 19, 2017, 5:00am UTC](https://discuss.elastic.co/t/context-aware-shard-distribution-across-nodes/100957/2 "2017-09-19T05:00:23Z")

</div>

It does that by default.

[https://www.elastic.co/guide/en/elasticsearch/reference/5.6/allocation-awareness.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/allocation-awareness.html) may also be something you could use if this is for redundancy purposes.

---

<div class="post-metadata">

**Author:** ![tanner-bruce](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tanner-bruce/32/21903_2.png) [@tanner-bruce](https://discuss.elastic.co/u/tanner-bruce)\
**Post date:** [September 19, 2017, 4:54pm UTC](https://discuss.elastic.co/t/context-aware-shard-distribution-across-nodes/100957/3 "2017-09-19T16:54:16Z")

</div>

Hi Mark,

Sorry, I phrased that badly. What I mean to say is I would like to have elasticsearch make extra effort distributing, say, all indices that match the regex 'data\_.\*' so that the shards in those indices will be spread across the cluster.

As it stands elasticsearch distributes all indices equally. What I would like to have it do is have it first distribute indices that match the regex (so they are spread out on the cluster as much as possible) and then have the rest distributed among the remaining space. So you could say my group of indices, 'data\_.\*' would be the _most_ distributed

In the end it is just helping elasticsearch spread the load via a bit of context-awareness on my indices

---

<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 17, 2017, 5:03pm UTC](https://discuss.elastic.co/t/context-aware-shard-distribution-across-nodes/100957/4 "2017-10-17T17:03:39Z")

</div>

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