Skip to content

Latest commit

 

History

History
217 lines (155 loc) · 6.34 KB

File metadata and controls

217 lines (155 loc) · 6.34 KB

Configure File-Based Data Rebalance

You control Data Service File-Based Rebalance (FBR) using the /internalSettings REST API endpoint.

Description

The file-based rebalance option for the Data Service directly copies vBucket data files between nodes during rebalance. This usually improves rebalance speed compared to DCP-based backfill method. See File-Based Rebalance for more information about file-based rebalance and how it compares to DCP-based rebalance.

HTTP Methods

This API endpoint supports the following methods:

Get FBR Settings

Get the current values of the FBR settings. The FBR settings are part of the internal settings, so this API returns all internal settings.

List All Internal Settings
GET /internalSettings

curl Syntax

curl -u ${USER}:${PASSWORD} -X GET \
        http[s]://${HOST}:${PORT}/internalSettings \
        | jq 'with_entries(select(.key | startswith("dataService")))'

Required Privileges

You must have at least 1 of the following roles to get the FBR settings:

  • Full Admin

  • Cluster Admin

  • Read-Only Security Admin

  • Security Admin

  • Local User Admin

Responses

200 OK

Returns the internal settings. See examples for an example of the settings.

401 Unauthorized

Returned when authentication fails, such as when the password is incorrect.

403 Forbidden

Returned if you do not have 1 of the roles listed in Required Privileges.

Examples

The following example gets the current values of the FBR settings. It filters the internal settings using the jq command to show only the FBR settings.

curl -s -u Administrator:password \
     -X GET http://node1.example.com:8091/internalSettings \
     | jq 'with_entries(select(.key | startswith("dataService")))'

Running the example returns a JSON object containing the current FBR settings, such as the following:

{
  "dataServiceFileBasedRebalanceEnabled": true,
  "dataServiceFileBasedRebalanceMovesPerNode": 4
}

The keys returned by the previous example are the FBR settings you can use to control FBR behavior:

dataServiceFileBasedRebalanceEnabled

When true, eligible vBucket moves use FBR; when false, all vBucket moves use DCP.

dataServiceFileBasedRebalanceMovesPerNode

The maximum number of concurrent file-based vBucket moves per node during rebalance.

Configure FBR

You can change the FBR settings using the REST API.

Change FBR Settings
POST /internalSettings

curl Syntax

curl -sS -u ${USER}:${PASSWORD} \
  -X POST http[s]://${HOST}:${PORT}/internalSettings \
  [-d dataServiceFileBasedRebalanceEnabled={true|false}] \
  [-d dataServiceFileBasedRebalanceMovesPerNode=<integer>]

Parameters

dataServiceFileBasedRebalanceEnabled

Set to true (the default) to allow the Data Service to use FBR when rebalancing data in eligible vBuckets. Set to false to force the Data Service to use DCP when rebalancing data.

Note
This setting can be overridden on a per-bucket basis using the bucket’s dataServiceRebalanceType setting. See Bucket-Level Rebalance Type for more information.
dataServiceFileBasedRebalanceMovesPerNode

Integer value that sets the maximum number of concurrent file-based vBucket moves per node during rebalance. Valid range of values is from 1 to 1024. The default value is 4. Increase this value when you perform a rebalance when your cluster has low loads. For example, consider increasing this value during scheduled maintenance windows. Decrease this value to reduce the overhead of rebalance on running workloads.

Note
This setting is independent of rebalanceMovesPerNode, which applies to DCP rebalance.

Required Privileges

You must have 1 of the following roles to change the FBR settings:

  • Full Admin

  • Cluster Admin

Responses

200 OK

Updating the value or values succeeded.

400 Bad Request

Returned if you specify an invalid value for either setting or an out-of-range value for dataServiceFileBasedRebalanceMovesPerNode.

Also returns a JSON object that describes the error, such as the following:

{
  "errors": [
    "dataServiceFileBasedRebalanceMovesPerNode - The value must be between 1 and 1024."
  ]
}
401 Unauthorized

Returned when authentication fails, such as when the password is incorrect.

403 Forbidden

Returned if you do not have the proper roles to call this API. See Required Privileges.

Examples

Disable FBR

The following example prevents the Data Service from using FBR cluster-wide:

curl -s -u Administrator:password \
     -X POST http://node1.example.com:8091/internalSettings \
     -d dataServiceFileBasedRebalanceEnabled=false
Set the Maximum Concurrent FBR Moves per Node

The following example sets the maximum number of concurrent file-based vBucket moves per node to 8:

curl -s -u Administrator:password \
     -X POST http://node1.example.com:8091/internalSettings \
     -d dataServiceFileBasedRebalanceMovesPerNode=8

See Also

  • For conceptual information, see File-Based Rebalance (FBR).

  • For UI configuration, see Rebalance Settings.

  • For per-bucket FBR configuration, see Bucket-Level Rebalance Type.