# Shard routing while active indexing

**URL:** <https://discuss.elastic.co/t/shard-routing-while-active-indexing/353326>\
**Category:** Elasticsearch\
**Created:** [February 15, 2024, 6:08am UTC](https://discuss.elastic.co/t/shard-routing-while-active-indexing/353326 "2024-02-15T06:08:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prashant\_Rana](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prashant_rana/32/42952_2.png) [@Prashant\_Rana](https://discuss.elastic.co/u/Prashant_Rana)\
**Post date:** [February 15, 2024, 6:08am UTC](https://discuss.elastic.co/t/shard-routing-while-active-indexing/353326/1 "2024-02-15T06:08:16Z")

</div>

What happens if I explicitly route a shard to a different node while the indexing happens to that shard in the original shard?

Should I stop indexing in that shard?

---

<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:** [February 15, 2024, 7:15am UTC](https://discuss.elastic.co/t/shard-routing-while-active-indexing/353326/2 "2024-02-15T07:15:28Z")

</div>

When you move a shard to a different node a replica is first created on the new node. Once this is in sync with the primary shard it can be promoted and the original primary shard removed. This is what happens behind the scenes when Elasticsearch moves shards due to events in the cluster, so there is no need to stop indexing.

---

<div class="post-metadata">

**Author:** ![Prashant\_Rana](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prashant_rana/32/42952_2.png) [@Prashant\_Rana](https://discuss.elastic.co/u/Prashant_Rana)\
**Post date:** [February 15, 2024, 10:24am UTC](https://discuss.elastic.co/t/shard-routing-while-active-indexing/353326/3 "2024-02-15T10:24:30Z")

</div>

Hi, thank you so much for the response. One more doubt, in case there is constant indexing happening to the shard I am trying to move to the new node, will the indexing delay the process of promoting the replica to primary in the new shard?

---

<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:** [February 15, 2024, 10:27am UTC](https://discuss.elastic.co/t/shard-routing-while-active-indexing/353326/4 "2024-02-15T10:27:06Z")

</div>

No. This will be handled seamlessly.

---

<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:** [March 14, 2024, 10:27am UTC](https://discuss.elastic.co/t/shard-routing-while-active-indexing/353326/5 "2024-03-14T10:27:35Z")

</div>

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