You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by mo...@apache.org on 2023/09/07 03:29:55 UTC
[apisix] branch master updated: docs: remove the note for the default value of `key` when `chash` is set as the load balancing algorithm (#10151)
This is an automated email from the ASF dual-hosted git repository.
monkeydluffy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new 00d719ef2 docs: remove the note for the default value of `key` when `chash` is set as the load balancing algorithm (#10151)
00d719ef2 is described below
commit 00d719ef2b1337802a8204d83d970a6a4ed8dcc2
Author: Traky Deng <tr...@gmail.com>
AuthorDate: Thu Sep 7 11:29:50 2023 +0800
docs: remove the note for the default value of `key` when `chash` is set as the load balancing algorithm (#10151)
---
docs/en/latest/admin-api.md | 3 +--
docs/zh/latest/admin-api.md | 1 -
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/docs/en/latest/admin-api.md b/docs/en/latest/admin-api.md
index 414c18154..6f96e18ab 100644
--- a/docs/en/latest/admin-api.md
+++ b/docs/en/latest/admin-api.md
@@ -900,7 +900,7 @@ In addition to the equalization algorithm selections, Upstream also supports pas
| service_name | required, can't be used with `nodes` | Service name used for [service discovery](discovery.md). [...]
| discovery_type | required, if `service_name` is used | The type of service [discovery](discovery.md). [...]
| hash_on | optional | Only valid if the `type` is `chash`. Supports Nginx variables (`vars`), custom headers (`header`), `cookie` and `consumer`. Defaults to `vars`. [...]
-| key | optional | Only valid if the `type` is `chash`. Finds the corresponding node `id` according to `hash_on` and `key` values. When `hash_on` is set to `vars`, `key` is a required parameter and it supports [Nginx variables](http://nginx.org/en/docs/varindex.html). When `hash_on` is set as `header`, `key` is a required parameter, and `header name` can be customized. When `hash_on` is set to `cookie`, `key` is also a required p [...]
+| key | optional | Only valid if the `type` is `chash`. Finds the corresponding node `id` according to `hash_on` and `key` values. When `hash_on` is set to `vars`, `key` is a required parameter and it supports [Nginx variables](http://nginx.org/en/docs/varindex.html). When `hash_on` is set as `header`, `key` is a required parameter, and `header name` can be customized. When `hash_on` is set to `cookie`, `key` is also a required p [...]
| checks | optional | Configures the parameters for the [health check](./tutorials/health-check.md). [...]
| retries | optional | Sets the number of retries while passing the request to Upstream using the underlying Nginx mechanism. Set according to the number of available backend nodes by default. Setting this to `0` disables retry. [...]
| retry_timeout | optional | Timeout to continue with retries. Setting this to `0` disables the retry timeout. [...]
@@ -935,7 +935,6 @@ The following should be considered when setting the `hash_on` value:
- When set to `cookie`, a `key` is required. This key is equal to "cookie\_`key`". The cookie name is case-sensitive.
- When set to `consumer`, the `key` is optional and the key is set to the `consumer_name` captured from the authentication Plugin.
- When set to `vars_combinations`, the `key` is required. The value of the key can be a combination of any of the [Nginx variables](http://nginx.org/en/docs/varindex.html) like `$request_uri$remote_addr`.
-- When no value is set for either `hash_on` or `key`, the key defaults to `remote_addr`.
The features described below requires APISIX to be run on [APISIX-Base](./FAQ.md#how-do-i-build-the-apisix-base-environment):
diff --git a/docs/zh/latest/admin-api.md b/docs/zh/latest/admin-api.md
index 5dd379678..acef9a2ad 100644
--- a/docs/zh/latest/admin-api.md
+++ b/docs/zh/latest/admin-api.md
@@ -942,7 +942,6 @@ APISIX 的 Upstream 除了基本的负载均衡算法选择外,还支持对上
- 设为 `header` 时,`key` 为必传参数,其值为自定义的 Header name,即 "http\_`key`"。
- 设为 `cookie` 时,`key` 为必传参数,其值为自定义的 cookie name,即 "cookie\_`key`"。请注意 cookie name 是**区分大小写字母**的。例如:`cookie_x_foo` 与 `cookie_X_Foo` 表示不同的 `cookie`。
- 设为 `consumer` 时,`key` 不需要设置。此时哈希算法采用的 `key` 为认证通过的 `consumer_name`。
-- 如果指定的 `hash_on` 和 `key` 获取不到值时,使用默认值:`remote_addr`。
以下特性需要 APISIX 运行于 [APISIX-Base](./FAQ.md#如何构建-APISIX-Base-环境?):