You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Dominique Bejean <do...@eolya.fr> on 2020/09/18 10:13:27 UTC

Autoscaling Rule for replica distribution across zones

Hi,

I have 4 nodes solrcloud cluster. 2 nodes (solr1 and solr3) are started
with the parametrer -Dzone=dc1 and  the 2 other nodes (solr 2 and Solr4)
are started with the parametrer -Dzone=dc2

I want to create Autoscaling placement Rule in order to equally distribute
replicas of a shard over zone (never 2 replicas of a shard in the same
zone). According documentation, I created this rule

{ "set-policy": { "policyzone": [ {"replica": "#EQUAL", "shard": "#EACH",
"sysprop.zone": ["dc1", "dc2"]} ] } }

I create a collection with 2 shards and 2 replicas, and the 4 cores are
created on solr2 and solr4 nodes so only in zone=dc2

What is wrong in my rule ?

Regards.

Dominique Béjean

Re: Autoscaling Rule for replica distribution across zones

Posted by Dominique Bejean <do...@eolya.fr>.
Hi,

I also tried this 2 rules and I still have all replicas of all shards of
the collection created in one single zone

curl 'http://localhost:8983/api/cluster/autoscaling' -H
'Content-type:application/json' -d '{ "set-policy": { "policyzone": [
{"replica": "#EQUAL", "shard": "#EACH", "nodeset":[{"sysprop.zone":
"dc1"},{"sysprop.zone":  "dc2"}]} ] } }'

curl 'http://localhost:8983/api/cluster/autoscaling' -H
'Content-type:application/json' -d '{ "set-policy": { "policyzone":
[{"replica": "50%", "shard": "#EACH", "nodeset":{ "sysprop.zone": "dc1"}},

{"replica": "50%", "shard": "#EACH", "nodeset":{"sysprop.zone": "dc2"}}] }
}'

Dominique


Le ven. 18 sept. 2020 à 12:13, Dominique Bejean <do...@eolya.fr>
a écrit :

> Hi,
>
> I have 4 nodes solrcloud cluster. 2 nodes (solr1 and solr3) are started
> with the parametrer -Dzone=dc1 and  the 2 other nodes (solr 2 and Solr4)
> are started with the parametrer -Dzone=dc2
>
> I want to create Autoscaling placement Rule in order to equally distribute
> replicas of a shard over zone (never 2 replicas of a shard in the same
> zone). According documentation, I created this rule
>
> { "set-policy": { "policyzone": [ {"replica": "#EQUAL", "shard": "#EACH",
> "sysprop.zone": ["dc1", "dc2"]} ] } }
>
> I create a collection with 2 shards and 2 replicas, and the 4 cores are
> created on solr2 and solr4 nodes so only in zone=dc2
>
> What is wrong in my rule ?
>
> Regards.
>
> Dominique Béjean
>
>
>
>
>
>
>
>