# Prevent shard in specific node

**URL:** <https://discuss.elastic.co/t/prevent-shard-in-specific-node/321619>\
**Category:** Elasticsearch\
**Created:** [December 20, 2022, 8:17am UTC](https://discuss.elastic.co/t/prevent-shard-in-specific-node/321619 "2022-12-20T08:17:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![m3bgwad](https://avatars.discourse-cdn.com/v4/letter/m/a183cd/32.png) [@m3bgwad](https://discuss.elastic.co/u/m3bgwad)\
**Post date:** [December 20, 2022, 8:17am UTC](https://discuss.elastic.co/t/prevent-shard-in-specific-node/321619/1 "2022-12-20T08:17:47Z")

</div>

Hello everyone,

how to prevent shard in specific node because I need add all nodes in the cluster but there is specific node RAM and CPU limitation, how to handle this approach and what is best practice to make this

thank you.

---

<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:** [December 20, 2022, 8:57am UTC](https://discuss.elastic.co/t/prevent-shard-in-specific-node/321619/2 "2022-12-20T08:57:44Z")

</div>

Use allocation filtering - [Index-level shard allocation filtering | Elasticsearch Guide [8.5] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.5/shard-allocation-filtering.html) and/or [Cluster-level shard allocation and routing settings | Elasticsearch Guide [8.5] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.5/modules-cluster.html#cluster-shard-allocation-filtering)

---

<div class="post-metadata">

**Author:** ![m3bgwad](https://avatars.discourse-cdn.com/v4/letter/m/a183cd/32.png) [@m3bgwad](https://discuss.elastic.co/u/m3bgwad)\
**Post date:** [December 20, 2022, 9:37am UTC](https://discuss.elastic.co/t/prevent-shard-in-specific-node/321619/3 "2022-12-20T09:37:35Z")

</div>

Thank you for replaying,  
based on your share of data I use that.

```auto
PUT _cluster/settings
{
  "persistent" : {
    "cluster.routing.allocation.exclude._ip" : "XX.XX.XX.XX"
  }
}

```

---

<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:** [January 17, 2023, 9:38am UTC](https://discuss.elastic.co/t/prevent-shard-in-specific-node/321619/4 "2023-01-17T09:38:30Z")

</div>

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