# Cluster.routing.allocation.awareness.attributes not working as documented

**URL:** <https://discuss.elastic.co/t/cluster-routing-allocation-awareness-attributes-not-working-as-documented/18906>\
**Category:** Elasticsearch\
**Created:** [July 25, 2014, 5:44pm UTC](https://discuss.elastic.co/t/cluster-routing-allocation-awareness-attributes-not-working-as-documented/18906 "2014-07-25T17:44:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yongtao\_You](https://avatars.discourse-cdn.com/v4/letter/y/dbc845/32.png) [@Yongtao\_You](https://discuss.elastic.co/u/Yongtao_You)\
**Post date:** [July 25, 2014, 5:44pm UTC](https://discuss.elastic.co/t/cluster-routing-allocation-awareness-attributes-not-working-as-documented/18906/1 "2014-07-25T17:44:52Z")

</div>

Hi,

I was experimenting with the  
"cluster.routing.allocation.awareness.attributes" setting. I started with  
one data node in the cluster, with allocation awareness attribute set to  
"value1". I expect that all the shards will be allocated to this node.  
Instead, only primary shards are allocated to this node. All the replicas  
are unassigned. Note that I have not set the  
"cluster.routing.allocation.awareness.force.zone.values" at all.

I'm using ES 1.1.1. Can anyone confirm? Or did I do something stupid. ☹

Thanks.  
Yongtao

--  
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/2b76037a-d5b8-4a1e-97dd-e17bfb559c89%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2b76037a-d5b8-4a1e-97dd-e17bfb559c89%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 25, 2014, 10:55pm UTC](https://discuss.elastic.co/t/cluster-routing-allocation-awareness-attributes-not-working-as-documented/18906/2 "2014-07-25T22:55:37Z")

</div>

Take a look at the example here

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

Basically a shard and it's replica will never be allocated to the same  
instance, which is what you are seeing.

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 26 July 2014 03:44, Yongtao You [yongtao.you@gmail.com](mailto:yongtao.you@gmail.com) wrote:

> Hi,
> 
> I was experimenting with the  
> "cluster.routing.allocation.awareness.attributes" setting. I started with  
> one data node in the cluster, with allocation awareness attribute set to  
> "value1". I expect that all the shards will be allocated to this node.  
> Instead, only primary shards are allocated to this node. All the replicas  
> are unassigned. Note that I have not set the  
> "cluster.routing.allocation.awareness.force.zone.values" at all.
> 
> I'm using ES 1.1.1. Can anyone confirm? Or did I do something stupid. ☹
> 
> Thanks.  
> Yongtao
> 
> --  
> 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/2b76037a-d5b8-4a1e-97dd-e17bfb559c89%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2b76037a-d5b8-4a1e-97dd-e17bfb559c89%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/2b76037a-d5b8-4a1e-97dd-e17bfb559c89%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/2b76037a-d5b8-4a1e-97dd-e17bfb559c89%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAEM624b22uEJ%3DkLLd%3D2XKVqrd1X53esAaHC-647u56O7muUcXg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624b22uEJ%3DkLLd%3D2XKVqrd1X53esAaHC-647u56O7muUcXg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Yongtao\_You](https://avatars.discourse-cdn.com/v4/letter/y/dbc845/32.png) [@Yongtao\_You](https://discuss.elastic.co/u/Yongtao_You)\
**Post date:** [July 25, 2014, 11:23pm UTC](https://discuss.elastic.co/t/cluster-routing-allocation-awareness-attributes-not-working-as-documented/18906/3 "2014-07-25T23:23:29Z")

</div>

Hmm... I'm reading the same document and came to the opposite conclusion.  
☹ My understanding is that if all the nodes have the same attribute, then  
_all_ shards will be deployed among them. As soon as a node with different  
attribute arrives, that's when the "replica will not be deployed to nodes  
with the same attribute as that of primary" apply. In my case, I only have  
one node, hence one attribute available. So all shards should be deployed.

Thanks.  
-Yongtao

On Friday, July 25, 2014 3:56:10 PM UTC-7, Mark Walkom wrote:

> Take a look at the example here  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-cluster.html#allocation-awareness)
> 
> Basically a shard and it's replica will never be allocated to the same  
> instance, which is what you are seeing.
> 
> Regards,  
> Mark Walkom
> 
> Infrastructure Engineer  
> Campaign Monitor  
> email: [ma...@campaignmonitor.com](mailto:ma...@campaignmonitor.com) \<javascript:\>  
> web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> 
> On 26 July 2014 03:44, Yongtao You \<[yongt...@gmail.com](mailto:yongt...@gmail.com) \<javascript:\>\>  
> wrote:
> 
> > Hi,
> > 
> > I was experimenting with the  
> > "cluster.routing.allocation.awareness.attributes" setting. I started with  
> > one data node in the cluster, with allocation awareness attribute set to  
> > "value1". I expect that all the shards will be allocated to this node.  
> > Instead, only primary shards are allocated to this node. All the replicas  
> > are unassigned. Note that I have not set the  
> > "cluster.routing.allocation.awareness.force.zone.values" at all.
> > 
> > I'm using ES 1.1.1. Can anyone confirm? Or did I do something stupid. ☹
> > 
> > Thanks.  
> > Yongtao
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/2b76037a-d5b8-4a1e-97dd-e17bfb559c89%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2b76037a-d5b8-4a1e-97dd-e17bfb559c89%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/2b76037a-d5b8-4a1e-97dd-e17bfb559c89%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/2b76037a-d5b8-4a1e-97dd-e17bfb559c89%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/5825d387-a4fc-4263-b34e-02b9b02c8043%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5825d387-a4fc-4263-b34e-02b9b02c8043%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 26, 2014, 1:40am UTC](https://discuss.elastic.co/t/cluster-routing-allocation-awareness-attributes-not-working-as-documented/18906/4 "2014-07-26T01:40:30Z")

</div>

If you only have one node the replicas will never be assigned.

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 26 July 2014 09:23, Yongtao You [yongtao.you@gmail.com](mailto:yongtao.you@gmail.com) wrote:

> Hmm... I'm reading the same document and came to the opposite conclusion.  
> ☹ My understanding is that if all the nodes have the same attribute, then  
> _all_ shards will be deployed among them. As soon as a node with different  
> attribute arrives, that's when the "replica will not be deployed to nodes  
> with the same attribute as that of primary" apply. In my case, I only have  
> one node, hence one attribute available. So all shards should be deployed.
> 
> Thanks.  
> -Yongtao
> 
> On Friday, July 25, 2014 3:56:10 PM UTC-7, Mark Walkom wrote:
> 
> > Take a look at the example here [http://www.elasticsearch.org/](http://www.elasticsearch.org/)  
> > guide/en/elasticsearch/reference/current/modules-cluster.html#allocation-  
> > awareness
> > 
> > Basically a shard and it's replica will never be allocated to the same  
> > instance, which is what you are seeing.
> > 
> > Regards,  
> > Mark Walkom
> > 
> > Infrastructure Engineer  
> > Campaign Monitor  
> > email: [ma...@campaignmonitor.com](mailto:ma...@campaignmonitor.com)  
> > web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> > 
> > On 26 July 2014 03:44, Yongtao You [yongt...@gmail.com](mailto:yongt...@gmail.com) wrote:
> > 
> > > Hi,
> > > 
> > > I was experimenting with the "cluster.routing.allocation.awareness.attributes"  
> > > setting. I started with one data node in the cluster, with allocation  
> > > awareness attribute set to "value1". I expect that all the shards will be  
> > > allocated to this node. Instead, only primary shards are allocated to this  
> > > node. All the replicas are unassigned. Note that I have not set the  
> > > "cluster.routing.allocation.awareness.force.zone.values" at all.
> > > 
> > > I'm using ES 1.1.1. Can anyone confirm? Or did I do something stupid. ☹
> > > 
> > > Thanks.  
> > > Yongtao
> > > 
> > > --  
> > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).
> > > 
> > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > msgid/elasticsearch/2b76037a-d5b8-4a1e-97dd-e17bfb559c89%  
> > > [40googlegroups.com](http://40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/2b76037a-d5b8-4a1e-97dd-e17bfb559c89%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/2b76037a-d5b8-4a1e-97dd-e17bfb559c89%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > 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/5825d387-a4fc-4263-b34e-02b9b02c8043%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5825d387-a4fc-4263-b34e-02b9b02c8043%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/5825d387-a4fc-4263-b34e-02b9b02c8043%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/5825d387-a4fc-4263-b34e-02b9b02c8043%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAEM624Y7uSAD5O5kzs0SOHM6\_MMZ4QqHi4ma6zGDKmKbXpvacg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624Y7uSAD5O5kzs0SOHM6_MMZ4QqHi4ma6zGDKmKbXpvacg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:12am UTC](https://discuss.elastic.co/t/cluster-routing-allocation-awareness-attributes-not-working-as-documented/18906/5 "2017-07-06T01:12:59Z")

</div>


