This is an automated email from the ASF dual-hosted git repository.
juzhiyuan 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 e468fb9 docs: improve the document more easier to read about upstream
host. (#3815)
e468fb9 is described below
commit e468fb901c5b55a25c17c419fb85376563faac90
Author: Wen Ming <[email protected]>
AuthorDate: Sat Mar 13 01:06:00 2021 +0800
docs: improve the document more easier to read about upstream host. (#3815)
---
docs/en/latest/admin-api.md | 20 ++++++++++----------
docs/en/latest/plugins/traffic-split.md | 20 ++++++++++----------
docs/zh/latest/admin-api.md | 2 +-
docs/zh/latest/plugins/traffic-split.md | 4 ++--
4 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/docs/en/latest/admin-api.md b/docs/en/latest/admin-api.md
index 604e3bb..9bb4922 100644
--- a/docs/en/latest/admin-api.md
+++ b/docs/en/latest/admin-api.md
@@ -23,15 +23,15 @@ title: Admin API
## Table of Contents
-* [Route](#route)
-* [Service](#service)
-* [Consumer](#consumer)
-* [Upstream](#upstream)
-* [SSL](#ssl)
-* [Global Rule](#global-rule)
-* [Plugin Config](#plugin-config)
-* [Plugin Metadata](#plugin-metadata)
-* [Plugin](#plugin)
+- [Route](#route)
+- [Service](#service)
+- [Consumer](#consumer)
+- [Upstream](#upstream)
+- [SSL](#ssl)
+- [Global Rule](#global-rule)
+- [Plugin config](#plugin-config)
+- [Plugin Metadata](#plugin-metadata)
+- [Plugin](#plugin)
## Route
@@ -530,7 +530,7 @@ In addition to the basic complex equalization algorithm
selection, APISIX's Upst
|timeout |optional| Set the timeout for connection, sending and
receiving messages. |
|name |optional|Identifies upstream names|
|desc |optional|upstream usage scenarios, and more.|
-|pass_host |optional|Specify the source of the upstream request host,
can be one of [`pass`, `node`, `rewrite`]. `pass`: use the host requested by
the client as the host of the upstream request, `node`: use the host configured
in the node of `upstream` as the upstream request host, `rewrite`: use the
value configured by `upstream_host` to rewrite the upstream request host. The
default is the `pass` method.|
+|pass_host |optional| `host` option when the request is sent to the
upstream, can be one of [`pass`, `node`, `rewrite`], the default option is
`pass`. `pass`: Pass the client's host transparently to the upstream; `node`:
Use the host configured in the node of `upstream`; `rewrite`: Use the value of
the configuration `upstream_host`.|
|upstream_host |optional|Specify the host of the upstream request. This
option is only valid if the `pass_host` is `rewrite`.|
|scheme |optional |The scheme used when talk with the upstream. The
value is one of ['http', 'https', 'grpc', 'grpcs'], default to 'http'.|
|labels |optional |Key/value pairs to specify
attributes|{"version":"v2","build":"16","env":"production"}|
diff --git a/docs/en/latest/plugins/traffic-split.md
b/docs/en/latest/plugins/traffic-split.md
index 80b84b7..fbd7408 100644
--- a/docs/en/latest/plugins/traffic-split.md
+++ b/docs/en/latest/plugins/traffic-split.md
@@ -23,14 +23,14 @@ title: traffic-split
## Summary
-- [**Name**](#name)
-- [**Attributes**](#attributes)
-- [**How To Enable**](#how-to-enable)
-- [**Example**](#example)
- - [**Grayscale Release**](#grayscale-release)
- - [**Blue-green Release**](#blue-green-release)
- - [**Custom Release**](#custom-release)
-- [**Disable Plugin**](#disable-plugin)
+- [Name](#name)
+- [Attributes](#attributes)
+- [How To Enable](#how-to-enable)
+- [Example](#example)
+ - [Grayscale Release](#grayscale-release)
+ - [Blue-green Release](#blue-green-release)
+ - [Custom Release](#custom-release)
+- [Disable Plugin](#disable-plugin)
## Name
@@ -50,8 +50,8 @@ Note: The ratio between each upstream may not so accurate
since the drawback of
| upstream.type | enum | optional | roundrobin |
[roundrobin, chash] | roundrobin supports weighted load, chash consistent
hashing, the two are alternatives. |
| upstream.nodes | object | optional | | | In
the hash table, the key of the internal element is the list of upstream machine
addresses, in the format of address + Port, where the address part can be an IP
or a domain name, such as 192.168.1.100:80, foo.com:80, etc. value is the
weight of the node. In particular, when the weight value is 0, it has special
meaning, which usually means that the upstream node is invalid and never wants
to be selected. |
| upstream.timeout | object | optional | 15 | |
Set the timeout period for connecting, sending and receiving messages (time
unit: second, all default to 15 seconds). |
-| upstream.pass_host | enum | optional | "pass" |
["pass", "node", "rewrite"] | pass: pass the host requested by the client,
node: pass the host requested by the client; use the host configured with the
upstream node, rewrite: rewrite the host with the value configured by the
upstream_host. |
-| `upstream.name` | string | optional | | |
Identify the upstream service name, usage scenario, etc. |
+| upstream.pass_host | enum | optional | "pass" |
["pass", "node", "rewrite"] | `pass`: Pass the client's host transparently to
the upstream; `node`: Use the host configured in the node of `upstream`;
`rewrite`: Use the value of the configuration `upstream_host`. |
+| upstream.name | string | optional | | |
Identify the upstream service name, usage scenario, etc. |
| upstream.upstream_host | string | optional | | | Only
valid when pass_host is configured as rewrite. |
| weighted_upstreams.weight | integer | optional | weight = 1
| | The traffic is divided according to the `weight` value, and the roundrobin
algorithm is used to divide multiple `weight`. |
diff --git a/docs/zh/latest/admin-api.md b/docs/zh/latest/admin-api.md
index e0cfa77..2ccc088 100644
--- a/docs/zh/latest/admin-api.md
+++ b/docs/zh/latest/admin-api.md
@@ -540,7 +540,7 @@ APISIX 的 Upstream 除了基本的复杂均衡算法选择外,还支持对上
| hash_on | 可选 | 辅助 | `hash_on`
支持的类型有 `vars`(Nginx 内置变量),`header`(自定义 header),`cookie`,`consumer`,默认值为 `vars`
|
| name | 可选 | 辅助 |
标识上游服务名称、使用场景等。
| |
| desc | 可选 | 辅助 |
上游服务描述、使用场景等。
| |
-| pass_host | 可选 | 枚举 | 指定上游请求
host 的来源,可以是 [`pass`,`node`,`rewrite`] 之一。`pass`: 使用客户端请求的 host 作为上游请求的 host,
`node`: 使用 `upstream` 的 node 中配置的 host 作为上游请求 host, `rewrite`: 使用
`upstream_host` 配置的值重写上游请求 host。默认为 `pass` 方式。
|
|
+| pass_host | 可选 | 枚举 | 请求发给上游时的
host 设置选型。 [`pass`,`node`,`rewrite`] 之一,默认是`pass`。`pass`: 将客户端的 host 透传给上游;
`node`: 使用 `upstream` node 中配置的 host; `rewrite`: 使用配置项 `upstream_host` 的值。
| |
| upstream_host | 可选 | 辅助 | 指定上游请求的
host,只在 `pass_host` 配置为 `rewrite` 时有效。
| |
| scheme | 可选 | 辅助 | 跟上游通信时使用的
scheme。需要是 ['http', 'https', 'grpc', 'grpcs'] 其中的一个,默认是 'http'。
|
| labels | 可选 | 匹配规则 | 标识附加属性的键值对
| {"version":"v2","build":"16","env":"production"} |
diff --git a/docs/zh/latest/plugins/traffic-split.md
b/docs/zh/latest/plugins/traffic-split.md
index efdc07c..1d13e1d 100644
--- a/docs/zh/latest/plugins/traffic-split.md
+++ b/docs/zh/latest/plugins/traffic-split.md
@@ -50,8 +50,8 @@ traffic-split 插件使用户可以逐步引导各个上游之间的流量百分
| upstream.type | enum | 可选 | roundrobin |
[roundrobin, chash] | roundrobin 支持权重的负载,chash 一致性哈希,两者是二选一的(目前只支持
`roundrobin`)。 |
| upstream.nodes | object | 可选 | | | 哈希表,内部元素的
key 是上游机器地址 列表,格式为地址 + Port,其中地址部 分可以是 IP 也可以是域名,⽐如
192.168.1.100:80、foo.com:80等。 value 则是节点的权重,特别的,当权重 值为 0 有特殊含义,通常代表该上游节点
失效,永远不希望被选中。 |
| upstream.timeout | object | 可选 | 15 | |
设置连接、发送消息、接收消息的超时时间(时间单位:秒,都默认为 15 秒)。 |
-| upstream.pass_host | enum | 可选 | "pass" | ["pass", "node",
"rewrite"] | pass: 透传客户端请求的 host, node: 不透传客户端请求的 host; 使用 upstream node 配置的
host, rewrite: 使用 upstream_host 配置的值重写 host 。 |
-| `upstream.name` | string | 可选 | | |
标识上游服务名称、使⽤场景等。 |
+| upstream.pass_host | enum | 可选 | "pass" | ["pass", "node",
"rewrite"] | `pass`: 将客户端的 host 透传给上游; `node`: 使用 `upstream` node 中配置的 host;
`rewrite`: 使用配置项 `upstream_host` 的值 |
+| upstream.name | string | 可选 | | | 标识上游服务名称、使⽤场景等。
|
| upstream.upstream_host | string | 可选 | | | 只在
pass_host 配置为 rewrite 时有效。 |
| weighted_upstreams.weight | integer | 可选 | weight = 1 |
| 根据 `weight` 值做流量划分,多个 weight 之间使用 roundrobin 算法划分。|