Getting Cluster Rebalance Reason Codes

    February 16, 2025
    + 12
    When the cluster/bucket/service needs to be rebalanced, you can retrieve the reason for the rebalance using the 'GET /pools/default' method.

    HTTP method and URI

    GET /pools/default

    Description

    At any point that the service needs rebalancing, you can use this method to obtain a detailed description of the reasons that the rebalance is required.

    The reason code(s) can be one or more of the following:

    • Service isn’t balanced.

    • Servers aren’t balanced.

    • The number of replicas has changed.

    • The bucket map isn’t balanced.

    The service returns the reason code only if a rebalance is required.

    Curl Syntax

    curl -v -X GET -u [admin]:[password]
      http://[localhost]:8091/pools/default

    Response

    On success, the response code 200 OK is given, and one or more reason codes are givem in the returned message.

    Returned JSON object (truncated)
    json5
    { "name": "default", "rebalanceStatus": "none", "rebalanceProgressUri": "/pools/default/rebalanceProgress", "stopRebalanceUri": "/controller/stopRebalance?uuid=8a05ca2847bc28ac92a484c9248fb261", "nodeStatusesUri": "/nodeStatuses", "nodeServicesUri": "/pools/default/nodeServices?v=89141026", "maxBucketCount": 30, "maxCollectionCount": 1200, "maxScopeCount": 1200, "minReplicasCount": 0, "tasks": { "uri": "/pools/default/tasks?v=86199101" }, "servicesNeedRebalance": [ { "code": "service_not_balanced", "description": "Service needs rebalance.", "services": [ "kv", "n1ql", "index", "fts", "cbas", "eventing", "backup" ] } ], "bucketsNeedRebalance": [ { "code": "servers_not_balanced", "description": "Servers of bucket are not balanced.", "buckets": [ "travel-sample" ] }, { "code": "num_replicas_changed", "description": "Number of replicas for bucket has changed.", "buckets": ["default", "travel-sample"] }, { "code": "servers_not_balanced", "description": "Bucket map needs rebalance.", "buckets": ["travel-sample"] } ], "serverGroupsUri": "/pools/default/serverGroups?v=20914152" }

    See Also

    For information on rebalancing, see the following: