# Shard placements question after rolling restart

**URL:** <https://discuss.elastic.co/t/shard-placements-question-after-rolling-restart/104760>\
**Category:** Elasticsearch\
**Created:** [October 21, 2017, 8:54am UTC](https://discuss.elastic.co/t/shard-placements-question-after-rolling-restart/104760 "2017-10-21T08:54:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![deimosfr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/deimosfr/32/45864_2.png) [@deimosfr](https://discuss.elastic.co/u/deimosfr)\
**Post date:** [October 21, 2017, 8:54am UTC](https://discuss.elastic.co/t/shard-placements-question-after-rolling-restart/104760/1 "2017-10-21T08:54:00Z")

</div>

Hi,

I've performed a rolling restart on a 3 nodes cluster. I've a replicas of 1, 4 shards per index and during the rolling restart, rebalance actions occurring makes my cluster always available and that's a good point. However, when the latest node of the cluster have finished to reboot, I see that there is no primary shards on it, only slave. Do you think this is a desirable effect ? Is there any advantage (regarding the balancing of the load) to force the placement of primary shards more homogeneously ?

Thanks

---

<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:** [October 21, 2017, 8:57am UTC](https://discuss.elastic.co/t/shard-placements-question-after-rolling-restart/104760/2 "2017-10-21T08:57:31Z")

</div>

Primary and replica shards generally do the same amount of work, so it is not necessarily an issue. One of the things where the work of primary and replica shards differ is around e.g. scripted updates to documents, where the new document id created on the primary and then replicated. If you are using a lot of updates you may want to manually reassign shards, but otherwise I would recommend leaving it as is unless you notice this resulting in uneven load.

---

<div class="post-metadata">

**Author:** ![deimosfr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/deimosfr/32/45864_2.png) [@deimosfr](https://discuss.elastic.co/u/deimosfr)\
**Post date:** [October 21, 2017, 9:03am UTC](https://discuss.elastic.co/t/shard-placements-question-after-rolling-restart/104760/3 "2017-10-21T09:03:10Z")

</div>

Thanks for your reply. Is there any option to avoid manual shard re-assignation ?

---

<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:** [October 21, 2017, 9:50am UTC](https://discuss.elastic.co/t/shard-placements-question-after-rolling-restart/104760/4 "2017-10-21T09:50:12Z")

</div>

You can [delay reallocation](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/delayed-allocation.html) when you perform a restart, which will prevent shards moving. It will however not prevent replica shards getting promoted to primary shards.

---

<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:** [November 18, 2017, 9:50am UTC](https://discuss.elastic.co/t/shard-placements-question-after-rolling-restart/104760/5 "2017-11-18T09:50:21Z")

</div>

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