# Rack behavior not what I expected

**URL:** <https://discuss.elastic.co/t/rack-behavior-not-what-i-expected/11384>\
**Category:** Elasticsearch\
**Created:** [March 29, 2013, 3:39pm UTC](https://discuss.elastic.co/t/rack-behavior-not-what-i-expected/11384 "2013-03-29T15:39:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Garth](https://avatars.discourse-cdn.com/v4/letter/g/ba9def/32.png) [@Garth](https://discuss.elastic.co/u/Garth)\
**Post date:** [March 29, 2013, 3:39pm UTC](https://discuss.elastic.co/t/rack-behavior-not-what-i-expected/11384/1 "2013-03-29T15:39:18Z")

</div>

ES: 0.20.4  
3 VM’s configured as Master/Data each.

Node-1  
node.rack\_id: r1  
cluster.routing.allocation.awareness.force.rack\_id.values: r1,r2  
cluster.routing.allocation.awareness.attributes: rack\_id

Node-2  
node.rack\_id: r2  
cluster.routing.allocation.awareness.force.rack\_id.values: r1,r2  
cluster.routing.allocation.awareness.attributes: rack\_id

Node-3  
node.rack\_id: r1  
cluster.routing.allocation.awareness.force.rack\_id.values: r1,r2  
cluster.routing.allocation.awareness.attributes: rack\_id

In creating an index, ES does NOT allocate the shards+replicas as per rack  
designation. They are intermixed across nodes as if no rack designation  
exists. Now restart all the ES nodes and the shards are split across two  
nodes and the replicas are on one, but never intermixed with primary.  
Create a new index and the primary + replica’s are intermixed and do not  
rebalance based on rack until all ES nodes are restarted.

Is this the expected behavior?

--  
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).  
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, 2:43am UTC](https://discuss.elastic.co/t/rack-behavior-not-what-i-expected/11384/2 "2017-07-06T02:43:34Z")

</div>


