Solr AutoScaling - Add replicas on new nodes

后端 未结 1 1445
难免孤独
难免孤独 2021-02-10 06:28

Using Solr version 7.3.1
Starting with 3 nodes:

I have created a collection like this:

wget \"localhost:8983/solr/admin/collections?action=CREATE&a         


        
1条回答
  •  逝去的感伤
    2021-02-10 06:49

    The short answer is that your goals are not not achievable today (till Solr 7.4).

    The NodeAddedTrigger only moves replicas from other nodes to the new node in an attempt to balance the cluster. It does not support adding new replicas. I have opened SOLR-12715 to add this feature.

    Similarly, the NodeLostTrigger adds new replicas on other nodes to replace the ones on the lost node. It, too, has no support for merely deleting replicas from cluster state. I have opened SOLR-12716 to address that issue. I hope to release both the enhancements in Solr 7.5.

    As for the third goal:

    Only one replica for each shard on each node.

    To achieve this, a policy rule given in the "Limit Replica Placement" example should suffice. However, looking at the screenshot you've posted, you actually mean a (collection,shard) pair which is unsupported today. You'd need a policy rule like the following (following does not work because collection:#EACH is not supported):

    {"replica": "<2", "collection": "#EACH", "shard": "#EACH", "node": "#ANY"}
    

    I have opened SOLR-12717 to add this feature.

    Thank you for these excellent use-cases. I'll recommend asking questions such as these on the solr-user mailing list because not a lot of Solr developers frequent Stackoverflow. I could only find this question because it was posted on the docker-solr project.

    0 讨论(0)
提交回复
热议问题