# Disable primary shard allocation on a set of nodes

**URL:** <https://discuss.elastic.co/t/disable-primary-shard-allocation-on-a-set-of-nodes/15290>\
**Category:** Elasticsearch\
**Created:** [January 17, 2014, 7:05am UTC](https://discuss.elastic.co/t/disable-primary-shard-allocation-on-a-set-of-nodes/15290 "2014-01-17T07:05:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amit\_Soni](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@Amit\_Soni](https://discuss.elastic.co/u/Amit_Soni)\
**Post date:** [January 17, 2014, 7:05am UTC](https://discuss.elastic.co/t/disable-primary-shard-allocation-on-a-set-of-nodes/15290/1 "2014-01-17T07:05:15Z")

</div>

Hello everyone - I have been looking at shard allocation awareness and  
trying to see if there is a way I can specify "do not assign  
_primary_shards to these set of nodes".

any idea how this can be achieved? thanks much!

-Amit.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAAOGaQKS6XYcdfXd2Gfmj60d6aVG%3Dxb0%3DOoe-8gbRyc2SdBBWQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAAOGaQKS6XYcdfXd2Gfmj60d6aVG%3Dxb0%3DOoe-8gbRyc2SdBBWQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 17, 2014, 7:49am UTC](https://discuss.elastic.co/t/disable-primary-shard-allocation-on-a-set-of-nodes/15290/2 "2014-01-17T07:49:21Z")

</div>

Why do you want to do that? All shards have about the same load unless you use \_primary or \_local preference.  
primary or replica is just a boolean attribute on a shard, right?

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 17 janvier 2014 at 08:05:46, Amit Soni ([amitsoni29@gmail.com](mailto:amitsoni29@gmail.com)) a écrit:

Hello everyone - I have been looking at shard allocation awareness and trying to see if there is a way I can specify "do not assign primary shards to these set of nodes".

any idea how this can be achieved? thanks much!

## -Amit.

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAAOGaQKS6XYcdfXd2Gfmj60d6aVG%3Dxb0%3DOoe-8gbRyc2SdBBWQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAAOGaQKS6XYcdfXd2Gfmj60d6aVG%3Dxb0%3DOoe-8gbRyc2SdBBWQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.52d8e081.333ab105.dc5%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.52d8e081.333ab105.dc5%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Amit\_Soni](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@Amit\_Soni](https://discuss.elastic.co/u/Amit_Soni)\
**Post date:** [January 17, 2014, 6:46pm UTC](https://discuss.elastic.co/t/disable-primary-shard-allocation-on-a-set-of-nodes/15290/3 "2014-01-17T18:46:02Z")

</div>

I might be wrong here to assume that primary shards might have a bit more  
load compared to replicas since the write request goes to them first and  
then they propagate to replicas. Would be great to get some enlightenment  
around how this process works (from load perspective)?

-Amit.

On Thu, Jan 16, 2014 at 11:49 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> Why do you want to do that? All shards have about the same load unless you  
> use \_primary or \_local preference.  
> primary or replica is just a boolean attribute on a shard, right?
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> 
> Le 17 janvier 2014 at 08:05:46, Amit Soni ([amitsoni29@gmail.com](mailto:amitsoni29@gmail.com)//amitsoni29@gmail.com)  
> a écrit:
> 
> Hello everyone - I have been looking at shard allocation awareness and  
> trying to see if there is a way I can specify "do not assign _primary_shards to these set of nodes".
> 
> any idea how this can be achieved? thanks much!
> 
> ## -Amit.
> 
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAAOGaQKS6XYcdfXd2Gfmj60d6aVG%3Dxb0%3DOoe-8gbRyc2SdBBWQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAAOGaQKS6XYcdfXd2Gfmj60d6aVG%3Dxb0%3DOoe-8gbRyc2SdBBWQ%40mail.gmail.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/etPan.52d8e081.333ab105.dc5%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.52d8e081.333ab105.dc5%40MacBook-Air-de-David.local)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAAOGaQ%2BRzaaG\_8gBRc2ExdL1Sv2Ji2BDu1UBTUJ2aXgHGmtdkw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAAOGaQ%2BRzaaG_8gBRc2ExdL1Sv2Ji2BDu1UBTUJ2aXgHGmtdkw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 17, 2014, 6:53pm UTC](https://discuss.elastic.co/t/disable-primary-shard-allocation-on-a-set-of-nodes/15290/4 "2014-01-17T18:53:30Z")

</div>

At the end, the same indexation process happens on the replica. So IMHO, it's somehow the same load on each node.

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 17 janvier 2014 at 19:46:34, Amit Soni ([amitsoni29@gmail.com](mailto:amitsoni29@gmail.com)) a écrit:

I might be wrong here to assume that primary shards might have a bit more load compared to replicas since the write request goes to them first and then they propagate to replicas. Would be great to get some enlightenment around how this process works (from load perspective)?

-Amit.

On Thu, Jan 16, 2014 at 11:49 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:  
Why do you want to do that? All shards have about the same load unless you use \_primary or \_local preference.  
primary or replica is just a boolean attribute on a shard, right?

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 17 janvier 2014 at 08:05:46, Amit Soni ([amitsoni29@gmail.com](mailto:amitsoni29@gmail.com)) a écrit:

Hello everyone - I have been looking at shard allocation awareness and trying to see if there is a way I can specify "do not assign primary shards to these set of nodes".

any idea how this can be achieved? thanks much!

## -Amit.

## You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAAOGaQKS6XYcdfXd2Gfmj60d6aVG%3Dxb0%3DOoe-8gbRyc2SdBBWQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAAOGaQKS6XYcdfXd2Gfmj60d6aVG%3Dxb0%3DOoe-8gbRyc2SdBBWQ%40mail.gmail.com). For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.52d8e081.333ab105.dc5%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.52d8e081.333ab105.dc5%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAAOGaQ%2BRzaaG\_8gBRc2ExdL1Sv2Ji2BDu1UBTUJ2aXgHGmtdkw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAAOGaQ%2BRzaaG_8gBRc2ExdL1Sv2Ji2BDu1UBTUJ2aXgHGmtdkw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.52d97c2a.2f305def.dc5%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.52d97c2a.2f305def.dc5%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 6, 2017, 1:56am UTC](https://discuss.elastic.co/t/disable-primary-shard-allocation-on-a-set-of-nodes/15290/5 "2017-07-06T01:56:10Z")

</div>


