# How to control how the indices distribute its shards to the data node?

**URL:** https://discuss.elastic.co/t/how-to-control-how-the-indices-distribute-its-shards-to-the-data-node/231468
**Category:** Elasticsearch
**Created:** [May 7, 2020, 7:03am UTC](https://discuss.elastic.co/t/how-to-control-how-the-indices-distribute-its-shards-to-the-data-node/231468 "2020-05-07T07:03:13Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![lusynda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lusynda/32/53557_2.png) [@lusynda](https://discuss.elastic.co/u/lusynda)
#### Post date: [May 7, 2020, 7:03am UTC](https://discuss.elastic.co/t/how-to-control-how-the-indices-distribute-its-shards-to-the-data-node/231468/1 "2020-05-07T07:03:13Z")

</div>

Hi all  
I have now a total of 4 data node, 1 i just recently added to the cluster. So now some of the indices in the cluster are moving its shard to that new node that i installed. but some how they are not evently distributed. For example, there is an index that i config with 12 shard, so i imagine that each node now will have 3 shard in total, but they are not moving the way i wanted at all.  
Is there a way for me to control how the indices will move it shard around or or some command that i can use to move the shard to i node that i want.

Thank in advance!

---

<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: [May 7, 2020, 11:44pm UTC](https://discuss.elastic.co/t/how-to-control-how-the-indices-distribute-its-shards-to-the-data-node/231468/2 "2020-05-07T23:44:32Z")

</div>

> [@lusynda](#):
>
> For example, there is an index that i config with 12 shard, so i imagine that each node now will have 3 shard in total, but they are not moving the way i wanted at all.

What is it doing then?

---

<div class="post-metadata">

### Author: ![lusynda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lusynda/32/53557_2.png) [@lusynda](https://discuss.elastic.co/u/lusynda)
#### Post date: [May 8, 2020, 1:53am UTC](https://discuss.elastic.co/t/how-to-control-how-the-indices-distribute-its-shards-to-the-data-node/231468/3 "2020-05-08T01:53:56Z")

</div>

Well it seem like what happen to me just because the node was newly added to our cluster so the shard movement is a little bit off.  
But still i want to be able to tell which shard is going to which node by hand since not all data node in my cluster have the same performance. i want the important shard to go to the high performance shard and the less important goes to the slower one  
Is that 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: [May 8, 2020, 2:04am UTC](https://discuss.elastic.co/t/how-to-control-how-the-indices-distribute-its-shards-to-the-data-node/231468/4 "2020-05-08T02:04:16Z")

</div>

You can use allocation filtering on the index level to do that - [https://www.elastic.co/guide/en/elasticsearch/reference/7.6/shard-allocation-filtering.html](https://www.elastic.co/guide/en/elasticsearch/reference/7.6/shard-allocation-filtering.html)

---

<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: [June 5, 2020, 2:18am UTC](https://discuss.elastic.co/t/how-to-control-how-the-indices-distribute-its-shards-to-the-data-node/231468/5 "2020-06-05T02:18:01Z")

</div>

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