Creating uneven distribution with allocation awareness


(Eran Kutner-2) #1

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


(Shay Banon) #2

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 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


(Eran Kutner-2) #3

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


(system) #4