# Appropriate shard allocation setting for rolling deployment without cluster functionality loss

**URL:** https://discuss.elastic.co/t/appropriate-shard-allocation-setting-for-rolling-deployment-without-cluster-functionality-loss/59579
**Category:** Elasticsearch
**Created:** [September 1, 2016, 4:52pm UTC](https://discuss.elastic.co/t/appropriate-shard-allocation-setting-for-rolling-deployment-without-cluster-functionality-loss/59579 "2016-09-01T16:52:18Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Devgruel](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@Devgruel](https://discuss.elastic.co/u/Devgruel)
#### Post date: [September 1, 2016, 4:52pm UTC](https://discuss.elastic.co/t/appropriate-shard-allocation-setting-for-rolling-deployment-without-cluster-functionality-loss/59579/1 "2016-09-01T16:52:18Z")

</div>

Hello,

I am interested in performing rolling deployments of Elasticsearch where the cluster does not lose any functionality during the deployment. The official [Rolling Deployment Documentation](https://www.elastic.co/guide/en/elasticsearch/guide/current/_rolling_restarts.html) says to set this transient setting:  
`"cluster.routing.allocation.enable" : "none"`  
but while this settings is applied users of the cluster cannot write any documents to newly created indices. Newly created indices also put the cluster in a red state which can be a problem when using the cluster health status to automatically orchestrate when the next node can be deployed in a rolling deployment.

For my use case setting the [shard allocation](https://www.elastic.co/guide/en/elasticsearch/reference/current/shards-allocation.html) setting to `new_primaries` instead of `none` seems appropriate.

Are there special performance concerns with using this setting for rolling deployments that led Elastic to recommend setting shard allocation to `none` instead of `new_primaries`? From my understanding it seems like there's no downside with the `new_primaries` setting as the new indices will not have data stored on the Elasticsearch node that is offline and about to return.

I am also interested in the difference between the `primaries` and `new_primaries` setting. Even with the shard allocation set to `none` Elasticsearch will promote replicas to primaries when the primary shard for an index is down. In what situation will setting shard allocation to `primaries` be different than `new_primaries`?

---

<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: [July 5, 2017, 10:23pm UTC](https://discuss.elastic.co/t/appropriate-shard-allocation-setting-for-rolling-deployment-without-cluster-functionality-loss/59579/2 "2017-07-05T22:23:09Z")

</div>


