-
Notifications
You must be signed in to change notification settings - Fork 182
DOC-13858 Server File-Based Rebalance for Data Service #4105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
rao-shwe
wants to merge
5
commits into
release/8.1
Choose a base branch
from
DOC-13858-fbr-for-data-service
base: release/8.1
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
dfd4845
basic-draft-of-all-sections-fbr-for-kv
rao-shwe 3a8583c
fixed-formatting-issues
rao-shwe 486fe1d
Spilt up Shwetha's monolithic doc and did lots of cleanup. Not ready …
ggray-cb 0cb76b8
Apply suggestions from code review
ggray-cb c3e92c0
Fixing issue spotted by CoPilot.
ggray-cb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
178 changes: 137 additions & 41 deletions
178
modules/learn/pages/clusters-and-availability/rebalance.adoc
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,217 @@ | ||
| = Configure File-Based Data Rebalance | ||
| :description: pass:q[You control Data Service File-Based Rebalance (FBR) using the `/internalSettings` REST API endpoint.] | ||
| :page-edition: Enterprise Edition | ||
| :page-topic-type: reference | ||
| :page-toclevels: 3 | ||
|
|
||
| [abstract] | ||
| {description} | ||
|
|
||
| == 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 xref:learn:clusters-and-availability/rebalance.adoc#file-based-rebalance[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-settings>> | ||
| * <<#set-settings>> | ||
|
|
||
| [#get-settings] | ||
| == 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 | ||
|
|
||
| [source,bash] | ||
| ---- | ||
| curl -u ${USER}:${PASSWORD} -X GET \ | ||
| http[s]://${HOST}:${PORT}/internalSettings \ | ||
| | jq 'with_entries(select(.key | startswith("dataService")))' | ||
| ---- | ||
|
|
||
| .Path Parameters | ||
| :priv-link: get-privs | ||
| include::partial$user_pwd_host_port_params.adoc[] | ||
|
|
||
|
|
||
| [#get-privs] | ||
| === Required Privileges | ||
|
|
||
| You must have at least 1 of the following roles to get the FBR settings: | ||
|
|
||
| * xref:learn:security/roles.adoc#full-admin[Full Admin] | ||
| * xref:learn:security/roles.adoc#cluster-admin[Cluster Admin] | ||
| * xref:learn:security/roles.adoc#ro-security-admin[Read-Only Security Admin] | ||
| * xref:learn:security/roles.adoc#security-admin[Security Admin] | ||
| * xref:learn:security/roles.adoc#local-user-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 <<get-privs>>. | ||
|
|
||
| [#get-settings-example] | ||
| === 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. | ||
|
|
||
| [source,bash] | ||
| ---- | ||
| 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: | ||
|
|
||
| [source,json] | ||
| ---- | ||
| { | ||
| "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. | ||
|
|
||
|
|
||
| [#set-settings] | ||
| == Configure FBR | ||
|
|
||
| You can change the FBR settings using the REST API. | ||
|
|
||
| .Change FBR Settings | ||
| ---- | ||
| POST /internalSettings | ||
| ---- | ||
|
|
||
| === curl Syntax | ||
|
|
||
| [source,bash] | ||
| ---- | ||
| curl -sS -u ${USER}:${PASSWORD} \ | ||
| -X POST http[s]://${HOST}:${PORT}/internalSettings \ | ||
| [-d dataServiceFileBasedRebalanceEnabled={true|false}] \ | ||
| [-d dataServiceFileBasedRebalanceMovesPerNode=<integer>] | ||
| ---- | ||
|
|
||
| === Path Parameters | ||
| :priv-link: settings-privs | ||
| include::partial$user-pw-host-port-params.adoc[] | ||
|
|
||
| === 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 xref:manage:manage-buckets/edit-bucket.adoc#bucket-rebalance-type[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. | ||
|
|
||
| [#settings-privs] | ||
| === Required Privileges | ||
|
|
||
| You must have 1 of the following roles to change the FBR settings: | ||
|
|
||
| * xref:learn:security/roles.adoc#full-admin[Full Admin] | ||
| * xref:learn:security/roles.adoc#cluster-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: | ||
|
|
||
| + | ||
| [source,json] | ||
| ---- | ||
| { | ||
| "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 <<#settings-privs>>. | ||
|
|
||
|
|
||
| [#settings-examples] | ||
| === Examples | ||
|
|
||
| [#disable-fbr-example] | ||
| .Disable FBR | ||
|
|
||
| The following example prevents the Data Service from using FBR cluster-wide: | ||
|
|
||
| [source,bash] | ||
| ---- | ||
| 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`: | ||
|
|
||
|
|
||
|
|
||
| [source,bash] | ||
| ---- | ||
| curl -s -u Administrator:password \ | ||
| -X POST http://node1.example.com:8091/internalSettings \ | ||
| -d dataServiceFileBasedRebalanceMovesPerNode=8 | ||
| ---- | ||
|
|
||
| === See Also | ||
|
|
||
| * For conceptual information, see xref:learn:clusters-and-availability/rebalance.adoc#file-based-rebalance[File-Based Rebalance (FBR)]. | ||
| * For UI configuration, see xref:manage:manage-settings/general-settings.adoc#rebalance-settings[Rebalance Settings]. | ||
| * For per-bucket FBR configuration, see xref:manage:manage-buckets/edit-bucket.adoc#bucket-rebalance-type[Bucket-Level Rebalance Type]. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.