Rebalance Based on File Transfer

      +
      The Search-Service REST API configures rebalance based on file transfer.

      HTTP Method and URI

      PUT /api/managerOptions

      Description

      The Search Service automatically partitions its indexes across all Search nodes in the cluster, ensuring optimal distribution, following rebalance.

      To achieve this, in versions of Couchbase Server prior to 7.1, by default, partitions needing to be newly created were entirely built, on their newly assigned nodes. In 7.1+, by default, new partitions are created by the transfer of partition files from old nodes to new nodes: this significantly enhances performance. This is an Enterprise-only feature, which requires all Search Service nodes either to be running 7.1 or later; or to be running 7.0.2, with the feature explicitly switched on by means of this endpoint. Note that users of 7.1+ can explicitly switch the feature off by means of this endpoint; in which case partition build is used to establish new partitions, rather than file transfer.

      During file transfer, should an unresolvable error occur, file transfer is automatically abandoned, and partition build is used instead.

      Curl Syntax

      curl -X PUT http://<ip-address-or-domain-name>:8094/api/managerOptions
        -u <username>:<password>
        -H "Content-type:application/json"
        -d '{"disableFileTransferRebalance": [ "true" | "false" ]}'

      If the value specified for the key disableFileTransferRebalance is false (which is the default in 7.1+), new Search-Service partitions are created during rebalance by means of partition-file transfer. If the value is true, partitions are created by means of partition build, from scratch; over DCP connections from the Data Service.

      Responses

      Success returns 200 OK, and the message {"status":"ok"}. If the URI is incorrectly specified, 404 Object Not Found is returned. If the method is incorrectly specified, 405 Method Not Allowed is returned, with the message {"error":"Method not allowed for endpoint","status":"fail"}.

      Failure to authenticate returns 401 Unauthorized.

      Examples

      The following example disables the creation of new partitions by means of file-transfer:

      curl -X PUT http://localhost:8094/api/managerOptions \
      -u Administrator:password \
      -H "Content-type:application/json" \
      -d '{"disableFileTransferRebalance": "true" }'

      From this point, Search-Service index-partitions are built on the new nodes assigned to them during rebalance.

      The following example re-enables the creation of new partitions by means of file-transfer:

      curl -X PUT http://localhost:8094/api/managerOptions \
      -u Administrator:password \
      -H "Content-type:application/json" \
      -d '{"disableFileTransferRebalance": "false" }'

      From this point, Search-Service index-partitions are again created by file transfer, on the new nodes assigned to them during rebalance.

      In each case, successful execution returns the following:

      {"status":"ok"}

      See Also

      An overview of rebalance for all services is provided at Rebalance. An overview of the REST API for the Search Service is provided at Search API. An architectural summary of the Search Service is provided at Search Service Architecture.