opensearch-docs-cn/_api-reference/cluster-api/cluster-awareness.md

131 lines
3.4 KiB
Markdown
Raw Normal View History

Add cluster awareness and decommission docs (#2438) * Add cluster awareness and decommission docs Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Bukhtawar Khan <bukhtawar7152@gmail.com> * Edit technical feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add new cluster awareness examples Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add technical feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Alice Williams <88908598+alicejw-aws@users.noreply.github.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Alice Williams <88908598+alicejw-aws@users.noreply.github.com> * Add Caroline's feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add one more tweak Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-decommission.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-decommission.md Co-authored-by: Nate Bower <nbower@amazon.com> * Add editoiral feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Fix typos Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Final editorial note Signed-off-by: Naarcha-AWS <naarcha@amazon.com> Signed-off-by: Naarcha-AWS <naarcha@amazon.com> Co-authored-by: Bukhtawar Khan <bukhtawar7152@gmail.com> Co-authored-by: Alice Williams <88908598+alicejw-aws@users.noreply.github.com> Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM> Co-authored-by: Nate Bower <nbower@amazon.com>
2023-01-23 18:13:07 -05:00
---
layout: default
title: Cluster routing and awareness
nav_order: 20
parent: Cluster APIs
has_children: false
redirect_from:
- /api-reference/cluster-awareness/
Add cluster awareness and decommission docs (#2438) * Add cluster awareness and decommission docs Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Bukhtawar Khan <bukhtawar7152@gmail.com> * Edit technical feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add new cluster awareness examples Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add technical feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Alice Williams <88908598+alicejw-aws@users.noreply.github.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Alice Williams <88908598+alicejw-aws@users.noreply.github.com> * Add Caroline's feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add one more tweak Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-decommission.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-decommission.md Co-authored-by: Nate Bower <nbower@amazon.com> * Add editoiral feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Fix typos Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Final editorial note Signed-off-by: Naarcha-AWS <naarcha@amazon.com> Signed-off-by: Naarcha-AWS <naarcha@amazon.com> Co-authored-by: Bukhtawar Khan <bukhtawar7152@gmail.com> Co-authored-by: Alice Williams <88908598+alicejw-aws@users.noreply.github.com> Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM> Co-authored-by: Nate Bower <nbower@amazon.com>
2023-01-23 18:13:07 -05:00
---
# Cluster routing and awareness
To control the distribution of search or HTTP traffic, you can use the weights per awareness attribute to control the distribution of search or HTTP traffic across zones. This is commonly used for zonal deployments, heterogeneous instances, and routing traffic away from zones during zonal failure.
## Path and HTTP methods
Add cluster awareness and decommission docs (#2438) * Add cluster awareness and decommission docs Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Bukhtawar Khan <bukhtawar7152@gmail.com> * Edit technical feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add new cluster awareness examples Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add technical feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Alice Williams <88908598+alicejw-aws@users.noreply.github.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Alice Williams <88908598+alicejw-aws@users.noreply.github.com> * Add Caroline's feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add one more tweak Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-decommission.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-decommission.md Co-authored-by: Nate Bower <nbower@amazon.com> * Add editoiral feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Fix typos Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Final editorial note Signed-off-by: Naarcha-AWS <naarcha@amazon.com> Signed-off-by: Naarcha-AWS <naarcha@amazon.com> Co-authored-by: Bukhtawar Khan <bukhtawar7152@gmail.com> Co-authored-by: Alice Williams <88908598+alicejw-aws@users.noreply.github.com> Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM> Co-authored-by: Nate Bower <nbower@amazon.com>
2023-01-23 18:13:07 -05:00
```
PUT /_cluster/routing/awareness/<attribute>/weights
GET /_cluster/routing/awareness/<attribute>/weights?local
GET /_cluster/routing/awareness/<attribute>/weights
```
## Path parameters
Parameter | Type | Description
:--- | :--- | :---
attribute | String | The name of the awareness attribute, usually `zone`. The attribute name must match the values listed in the request body when assigning weights to zones.
## Request body parameters
Parameter | Type | Description
:--- | :--- | :---
weights | JSON object | Assigns weights to attributes within the request body of the PUT request. Weights can be set in any ratio, for example, 2:3:5. In a 2:3:5 ratio with 3 zones, for every 100 requests sent to the cluster, each zone would receive either 20, 30, or 50 search requests in a random order. When assigned a weight of `0`, the zone does not receive any search traffic.
_version | String | Implements optimistic concurrency control (OCC) through versioning. The parameter uses simple versioning, such as `1`, and increments upward based on each subsequent modification. This allows any servers from which a request originates to validate whether or not a zone has been modified.
In the following example request body, `zone_1` and `zone_2` receive 50 requests each, whereas `zone_3` is prevented from receiving requests:
```
{
"weights":
{
"zone_1": "5",
"zone_2": "5",
"zone_3": "0"
}
"_version" : 1
}
```
## Example: Weighted round robin search
The following example request creates a round robin shard allocation for search traffic by using an undefined ratio:
### Request
```json
Add cluster awareness and decommission docs (#2438) * Add cluster awareness and decommission docs Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Bukhtawar Khan <bukhtawar7152@gmail.com> * Edit technical feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add new cluster awareness examples Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add technical feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Alice Williams <88908598+alicejw-aws@users.noreply.github.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Alice Williams <88908598+alicejw-aws@users.noreply.github.com> * Add Caroline's feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add one more tweak Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-decommission.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-decommission.md Co-authored-by: Nate Bower <nbower@amazon.com> * Add editoiral feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Fix typos Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Final editorial note Signed-off-by: Naarcha-AWS <naarcha@amazon.com> Signed-off-by: Naarcha-AWS <naarcha@amazon.com> Co-authored-by: Bukhtawar Khan <bukhtawar7152@gmail.com> Co-authored-by: Alice Williams <88908598+alicejw-aws@users.noreply.github.com> Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM> Co-authored-by: Nate Bower <nbower@amazon.com>
2023-01-23 18:13:07 -05:00
PUT /_cluster/routing/awareness/zone/weights
{
"weights":
{
"zone_1": "1",
"zone_2": "1",
"zone_3": "0"
}
"_version" : 1
}
```
{% include copy-curl.html %}
Add cluster awareness and decommission docs (#2438) * Add cluster awareness and decommission docs Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Bukhtawar Khan <bukhtawar7152@gmail.com> * Edit technical feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add new cluster awareness examples Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add technical feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Alice Williams <88908598+alicejw-aws@users.noreply.github.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Alice Williams <88908598+alicejw-aws@users.noreply.github.com> * Add Caroline's feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add one more tweak Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-decommission.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-decommission.md Co-authored-by: Nate Bower <nbower@amazon.com> * Add editoiral feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Fix typos Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Final editorial note Signed-off-by: Naarcha-AWS <naarcha@amazon.com> Signed-off-by: Naarcha-AWS <naarcha@amazon.com> Co-authored-by: Bukhtawar Khan <bukhtawar7152@gmail.com> Co-authored-by: Alice Williams <88908598+alicejw-aws@users.noreply.github.com> Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM> Co-authored-by: Nate Bower <nbower@amazon.com>
2023-01-23 18:13:07 -05:00
### Response
```
{
"acknowledged": true
}
```
## Example: Getting weights for all zones
The following example request gets weights for all zones.
### Request
```json
Add cluster awareness and decommission docs (#2438) * Add cluster awareness and decommission docs Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Bukhtawar Khan <bukhtawar7152@gmail.com> * Edit technical feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add new cluster awareness examples Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add technical feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Alice Williams <88908598+alicejw-aws@users.noreply.github.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Alice Williams <88908598+alicejw-aws@users.noreply.github.com> * Add Caroline's feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add one more tweak Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-decommission.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-decommission.md Co-authored-by: Nate Bower <nbower@amazon.com> * Add editoiral feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Fix typos Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Final editorial note Signed-off-by: Naarcha-AWS <naarcha@amazon.com> Signed-off-by: Naarcha-AWS <naarcha@amazon.com> Co-authored-by: Bukhtawar Khan <bukhtawar7152@gmail.com> Co-authored-by: Alice Williams <88908598+alicejw-aws@users.noreply.github.com> Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM> Co-authored-by: Nate Bower <nbower@amazon.com>
2023-01-23 18:13:07 -05:00
GET /_cluster/routing/awareness/zone/weights
```
{% include copy-curl.html %}
Add cluster awareness and decommission docs (#2438) * Add cluster awareness and decommission docs Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Bukhtawar Khan <bukhtawar7152@gmail.com> * Edit technical feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add new cluster awareness examples Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add technical feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Alice Williams <88908598+alicejw-aws@users.noreply.github.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Alice Williams <88908598+alicejw-aws@users.noreply.github.com> * Add Caroline's feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add one more tweak Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-decommission.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-decommission.md Co-authored-by: Nate Bower <nbower@amazon.com> * Add editoiral feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Fix typos Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Final editorial note Signed-off-by: Naarcha-AWS <naarcha@amazon.com> Signed-off-by: Naarcha-AWS <naarcha@amazon.com> Co-authored-by: Bukhtawar Khan <bukhtawar7152@gmail.com> Co-authored-by: Alice Williams <88908598+alicejw-aws@users.noreply.github.com> Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM> Co-authored-by: Nate Bower <nbower@amazon.com>
2023-01-23 18:13:07 -05:00
### Response
OpenSearch responds with the weight of each zone:
```json
{
"weights":
{
"zone_1": "1.0",
"zone_2": "1.0",
"zone_3": "0.0"
},
"_version":1
}
```
## Example: Deleting weights
You can remove your weight ratio for each zone using the `DELETE` method.
### Request
```json
Add cluster awareness and decommission docs (#2438) * Add cluster awareness and decommission docs Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Bukhtawar Khan <bukhtawar7152@gmail.com> * Edit technical feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add new cluster awareness examples Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add technical feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Alice Williams <88908598+alicejw-aws@users.noreply.github.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Alice Williams <88908598+alicejw-aws@users.noreply.github.com> * Add Caroline's feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add one more tweak Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-decommission.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-decommission.md Co-authored-by: Nate Bower <nbower@amazon.com> * Add editoiral feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Fix typos Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Final editorial note Signed-off-by: Naarcha-AWS <naarcha@amazon.com> Signed-off-by: Naarcha-AWS <naarcha@amazon.com> Co-authored-by: Bukhtawar Khan <bukhtawar7152@gmail.com> Co-authored-by: Alice Williams <88908598+alicejw-aws@users.noreply.github.com> Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM> Co-authored-by: Nate Bower <nbower@amazon.com>
2023-01-23 18:13:07 -05:00
DELETE /_cluster/routing/awareness/zone/weights
```
{% include copy-curl.html %}
Add cluster awareness and decommission docs (#2438) * Add cluster awareness and decommission docs Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Bukhtawar Khan <bukhtawar7152@gmail.com> * Edit technical feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add new cluster awareness examples Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add technical feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Alice Williams <88908598+alicejw-aws@users.noreply.github.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Alice Williams <88908598+alicejw-aws@users.noreply.github.com> * Add Caroline's feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add one more tweak Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _ml-commons-plugin/cluster-settings.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-decommission.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-awareness.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update _api-reference/cluster-decommission.md Co-authored-by: Nate Bower <nbower@amazon.com> * Add editoiral feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Fix typos Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Final editorial note Signed-off-by: Naarcha-AWS <naarcha@amazon.com> Signed-off-by: Naarcha-AWS <naarcha@amazon.com> Co-authored-by: Bukhtawar Khan <bukhtawar7152@gmail.com> Co-authored-by: Alice Williams <88908598+alicejw-aws@users.noreply.github.com> Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM> Co-authored-by: Nate Bower <nbower@amazon.com>
2023-01-23 18:13:07 -05:00
### Response
```json
{
"_version":1
}
```
## Next steps
- For more information about zone commissioning, see [Cluster decommission]({{site.url}}{{site.baseurl}}/api-reference/cluster-decommission/).
- For more information about allocation awareness, see [Cluster formation]({{site.url}}{{site.baseurl}}/opensearch/cluster/#advanced-step-6-configure-shard-allocation-awareness-or-forced-awareness).