Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Two new public interfaces are needed, one API addition, one API change and one ReplicaPlacementPlugin method.

 API

Utilize new NodeBalance Replicas:

v1: (If we want a v1 API)

GET /solr/admin/collections?action=UTILIZENODE&node=node-name&sourceNodes=source-node-name-1,source-node-name-2

v2:

POSTPUT /api/cluster/nodes/localhost:7574_solr/utilizebalanceReplicas
{
"sourceNodesnodes": [], (Optional)
"waitForFinalState": false,
  "async": "async"
}

...

PlacementPlugin

public interface UtilizeSelectionRequestBalanceRequest extends ModificationRequest {}

public interface PlacementPlugin {

List<UtilizeSelection> computeUtilizeSelectionpublic BalancePlan computeBalancing(
Collection<UtilizeSelectionRequest> utilizeSelectionRequestsBalanceRequest balanceRequest, PlacementContext placementContext)
throws PlacementException, InterruptedException;
} {


This method will compute a list of replicas to be moved from the sourceNodes to the targetNodesbalanced across the given nodes.

The UtilizeNode BalanceReplicas request can then, take this list, create the new replicas using similar logic to the ReplaceNode command, then delete the old replicas afterwards. 

...

Two options, either the HPA creation is done by the Solr Operator or by the user. We can support both.

spec:
...
autoscaleReplicasautoscale:
utilizeNodesOnScaleUpbalanceReplicasOnScaleUp: truefalse
vacateNodesOnScaleDownevictReplicasOnScaleDown: true
hpa:
create: true
minimumNodes: 2
maximumNodes: 10
metrics:
...
customSolrKubeOptions:
  horizontalPodAutoscalerOptions:
    behavior: ...

...