# Creating uneven distribution with allocation awareness

**URL:** <https://discuss.elastic.co/t/creating-uneven-distribution-with-allocation-awareness/7582>\
**Category:** Elasticsearch\
**Created:** [May 7, 2012, 2:50pm UTC](https://discuss.elastic.co/t/creating-uneven-distribution-with-allocation-awareness/7582 "2012-05-07T14:50:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eran\_Kutner\_2](https://avatars.discourse-cdn.com/v4/letter/e/dc4da7/32.png) [@Eran\_Kutner\_2](https://discuss.elastic.co/u/Eran_Kutner_2)\
**Post date:** [May 7, 2012, 2:50pm UTC](https://discuss.elastic.co/t/creating-uneven-distribution-with-allocation-awareness/7582/1 "2012-05-07T14:50:33Z")

</div>

Hi,  
I'd like to deploy a cluster in two zones such that one zone (the  
primary) has 2 replicas and the other zone (the secondary) has only 1  
replica of each shard.  
With forced awareness I can guarantee at least one copy will make it  
to the secondary zone but I don't see how to configure it to guarantee  
that two replicas from all shards shards of all the indexes will fall  
on one zone and one replica on the other.  
Will specifying the same zone twice in  
cluster.routing.allocation.awareness.force.zone.values do the trick?  
Or maybe assigning each node in the primary zone to two "virtual"  
zones?

Thanks,  
Eran

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [May 9, 2012, 9:01am UTC](https://discuss.elastic.co/t/creating-uneven-distribution-with-allocation-awareness/7582/2 "2012-05-09T09:01:50Z")

</div>

The order of the zones listed in the forced awareness will control where  
the "extra" replicas will be placed. So list the zone that you want to have  
2 copies as the first one in the forced awareness.

On Mon, May 7, 2012 at 5:50 PM, Eran Kutner [eran@gigya-inc.com](mailto:eran@gigya-inc.com) wrote:

> Hi,  
> I'd like to deploy a cluster in two zones such that one zone (the  
> primary) has 2 replicas and the other zone (the secondary) has only 1  
> replica of each shard.  
> With forced awareness I can guarantee at least one copy will make it  
> to the secondary zone but I don't see how to configure it to guarantee  
> that two replicas from all shards shards of all the indexes will fall  
> on one zone and one replica on the other.  
> Will specifying the same zone twice in  
> cluster.routing.allocation.awareness.force.zone.values do the trick?  
> Or maybe assigning each node in the primary zone to two "virtual"  
> zones?
> 
> Thanks,  
> Eran

---

<div class="post-metadata">

**Author:** ![Eran\_Kutner\_2](https://avatars.discourse-cdn.com/v4/letter/e/dc4da7/32.png) [@Eran\_Kutner\_2](https://discuss.elastic.co/u/Eran_Kutner_2)\
**Post date:** [May 10, 2012, 8:52pm UTC](https://discuss.elastic.co/t/creating-uneven-distribution-with-allocation-awareness/7582/3 "2012-05-10T20:52:47Z")

</div>

Thanks. That works.

On Wednesday, May 9, 2012 12:01:50 PM UTC+3, kimchy wrote:

> The order of the zones listed in the forced awareness will control where  
> the "extra" replicas will be placed. So list the zone that you want to have  
> 2 copies as the first one in the forced awareness.
> 
> Hi,
> 
> > I'd like to deploy a cluster in two zones such that one zone (the  
> > primary) has 2 replicas and the other zone (the secondary) has only 1  
> > replica of each shard.  
> > With forced awareness I can guarantee at least one copy will make it  
> > to the secondary zone but I don't see how to configure it to guarantee  
> > that two replicas from all shards shards of all the indexes will fall  
> > on one zone and one replica on the other.  
> > Will specifying the same zone twice in  
> > cluster.routing.allocation.awareness.force.zone.values do the trick?  
> > Or maybe assigning each node in the primary zone to two "virtual"  
> > zones?
> > 
> > Thanks,  
> > Eran

---

<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, 3:29am UTC](https://discuss.elastic.co/t/creating-uneven-distribution-with-allocation-awareness/7582/4 "2017-07-06T03:29:23Z")

</div>


