-
Notifications
You must be signed in to change notification settings - Fork 559
Update cluster manager task throttling documentation to reflect enabled-by-default behavior (previously disabled) #9749
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
Merged
kolchfa-aws
merged 4 commits into
opensearch-project:main
from
gargmanik13:enable_default_throttling
Apr 29, 2025
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ For many cluster state updates, such as defining a mapping or creating an index, | |
|
||
The first line of defense is to implement mechanisms in the caller nodes to avoid task overload on the cluster manager. However, even with those mechanisms in place, the cluster manager needs a built-in way to protect itself: cluster manager task throttling. | ||
|
||
To turn on cluster manager task throttling, you need to set throttling limits. The cluster manager uses the throttling limits to determine whether to reject a task. | ||
By default, the cluster manager uses predefined throttling limits to determine whether to reject a task. You can modify these limits or disable throttling for specific task types. | ||
|
||
The cluster manager rejects a task based on its type. For any incoming task, the cluster manager evaluates the total number of tasks of the same type in the pending task queue. If this number exceeds the threshold for this task type, the cluster manager rejects the incoming task. Rejecting a task does not affect tasks of a different type. For example, if the cluster manager rejects a `put-mapping` task, it can still accept a subsequent `create-index` task. | ||
|
||
|
@@ -21,7 +21,7 @@ When the cluster manager rejects a task, the node performs retries with exponent | |
|
||
You can set throttling limits by specifying them in the `cluster_manager.throttling.thresholds` object and updating the [OpenSearch cluster settings]({{site.url}}{{site.baseurl}}/api-reference/cluster-settings). The setting is dynamic, so you can change the behavior of this feature without restarting your cluster. | ||
|
||
By default, throttling is disabled for all task types. | ||
By default, throttling is enabled for all task types. To disable throttling for a specific task type, set its threshold value to `-1`. | ||
{: .note} | ||
|
||
The request has the following format: | ||
|
@@ -32,58 +32,65 @@ PUT _cluster/settings | |
"persistent": { | ||
"cluster_manager.throttling.thresholds" : { | ||
"<task-type>" : { | ||
"value" : <threshold limit> | ||
"value" : <threshold> | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
The following table describes the `cluster_manager.throttling.thresholds` object. | ||
The `cluster_manager.throttling.thresholds` object contains the following fields. | ||
|
||
Field Name | Description | ||
Field name | Description | ||
:--- | :--- | ||
task-type | The task type. See [supported task types](#supported-task-types) for a list of valid values. | ||
value | The maximum number of tasks of the `task-type` type in the cluster manager's pending task queue. Default is `-1` (no task throttling). | ||
|
||
## Supported task types | ||
|
||
The following task types are supported: | ||
|
||
- `create-index` | ||
- `update-settings` | ||
- `cluster-update-settings` | ||
- `auto-create` | ||
- `delete-index` | ||
- `delete-dangling-index` | ||
- `create-data-stream` | ||
- `remove-data-stream` | ||
- `rollover-index` | ||
- `index-aliases` | ||
- `put-mapping` | ||
- `create-index-template` | ||
- `remove-index-template` | ||
- `create-component-template` | ||
- `remove-component-template` | ||
- `create-index-template-v2` | ||
- `remove-index-template-v2` | ||
- `put-pipeline` | ||
- `delete-pipeline` | ||
- `create-persistent-task` | ||
- `finish-persistent-task` | ||
- `remove-persistent-task` | ||
- `update-task-state` | ||
- `put-script` | ||
- `delete-script` | ||
- `put-repository` | ||
- `delete-repository` | ||
- `create-snapshot` | ||
- `delete-snapshot` | ||
- `update-snapshot-state` | ||
- `restore-snapshot` | ||
- `cluster-reroute-api` | ||
|
||
#### Example request | ||
`<task-type>` | The task type. For a list of valid task types, see [supported task types and default thresholds](#supported-task-types-and-default-thresholds). | ||
`<task-type>.value` | The maximum number of tasks of the `task-type` type in the cluster manager's pending task queue. <br> For default thresholds for each task type, see [Supported task types and default thresholds](#supported-task-types-and-default-thresholds). | ||
|
||
## Supported task types and default thresholds | ||
|
||
The following table lists all supported task types and their default throttling threshold values. | ||
|
||
Task type | Threshold | ||
:--- | :--- | ||
`create-index `| 50 | ||
`update-settings` | 50 | ||
`cluster-update-settings` | 50 | ||
`auto-create` | 200 | ||
`delete-index` | 50 | ||
`delete-dangling-index `| 50 | ||
`create-data-stream` | 50 | ||
`remove-data-stream` | 50 | ||
`rollover-index` | 200 | ||
`index-aliases` | 200 | ||
`put-mapping` | 10000 | ||
`create-index-template` | 50 | ||
`remove-index-template` | 50 | ||
`create-component-template` | 50 | ||
`remove-component-template` | 50 | ||
`create-index-template-v2` | 50 | ||
`remove-index-template-v2` | 50 | ||
`put-pipeline` | 50 | ||
`delete-pipeline` | 50 | ||
`put-search-pipeline` | 50 | ||
`delete-search-pipeline` | 50 | ||
`create-persistent-task` | 50 | ||
`finish-persistent-task` | 50 | ||
`remove-persistent-task` | 50 | ||
`update-task-state` | 50 | ||
`create-query-group` | 50 | ||
`delete-query-group` | 50 | ||
`update-query-group` | 50 | ||
`put-script` | 50 | ||
`delete-script` | 50 | ||
`put-repository` | 50 | ||
`delete-repository` | 50 | ||
`create-snapshot` | 50 | ||
`delete-snapshot` | 50 | ||
`update-snapshot-state` | 5000 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 5,000? |
||
`restore-snapshot` | 50 | ||
`cluster-reroute-api` | 50 | ||
|
||
## Example request | ||
|
||
The following request sets the throttling threshold for the `put-mapping` task type to 100: | ||
|
||
|
@@ -100,8 +107,5 @@ PUT _cluster/settings | |
} | ||
``` | ||
|
||
Set the threshold to `-1` to disable throttling for a task type. | ||
{: .note} | ||
|
||
|
||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
10,000?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better not to have a comma because then people understand not to put a comma in the actual request. But doing code font for all numbers might be an overkill, so I"d leave as is.