You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by sy...@apache.org on 2023/06/22 23:46:37 UTC

[apisix] branch master updated: docs: add example for timeout (#9708)

This is an automated email from the ASF dual-hosted git repository.

sylviasu 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 3b31939d5 docs: add example for timeout (#9708)
3b31939d5 is described below

commit 3b31939d56ff4a9dc39609d1bcc0978f826f394f
Author: Abhishek Choudhary <sh...@gmail.com>
AuthorDate: Fri Jun 23 05:16:31 2023 +0530

    docs: add example for timeout (#9708)
---
 docs/en/latest/admin-api.md | 2 +-
 docs/zh/latest/admin-api.md | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/en/latest/admin-api.md b/docs/en/latest/admin-api.md
index eb2701e69..74049f9ef 100644
--- a/docs/en/latest/admin-api.md
+++ b/docs/en/latest/admin-api.md
@@ -858,7 +858,7 @@ In addition to the equalization algorithm selections, Upstream also supports pas
 | 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.                                                                                                                                                                                                                                                                                                                                              [...]
-| timeout                     | optional                                    | Sets the timeout (in seconds) for connecting to, and sending and receiving messages to and from the Upstream.                                                                                                                                                                                                                                                                                                                  [...]
+| timeout                     | optional                                    | Sets the timeout (in seconds) for connecting to, and sending and receiving messages to and from the Upstream. | `{"connect": 0.5,"send": 0.5,"read": 0.5}` |
 | name                        | optional                                    | Identifier for the Upstream.                                                                                                                                                                                                                                                                                                                                                                                                   [...]
 | desc                        | optional                                    | Description of usage scenarios.                                                                                                                                                                                                                                                                                                                                                                                                [...]
 | pass_host                   | optional                                    | Configures the `host` when the request is forwarded to the upstream. Can be one of `pass`, `node` or `rewrite`. Defaults to `pass` if not specified. `pass`- transparently passes the client's host to the Upstream. `node`- uses the host configured in the node of the Upstream. `rewrite`- Uses the value configured in `upstream_host`.                                                                                    [...]
diff --git a/docs/zh/latest/admin-api.md b/docs/zh/latest/admin-api.md
index 11980db12..72707eee4 100644
--- a/docs/zh/latest/admin-api.md
+++ b/docs/zh/latest/admin-api.md
@@ -871,7 +871,7 @@ APISIX 的 Upstream 除了基本的负载均衡算法选择外,还支持对上
 | checks         | 否                                             | health_checker | 配置健康检查的参数,详细信息请参考 [health-check](health-check.md)。                                                                                                                                                                                                                                                                                               |                                                  |
 | retries        | 否                                             | 整型           | 使用 NGINX 重试机制将请求传递给下一个上游,默认启用重试机制且次数为后端可用的节点数量。如果指定了具体重试次数,它将覆盖默认值。当设置为 `0` 时,表示不启用重试机制。                                                                                                                                                                                                 |                                                  |
 | retry_timeout  | 否                                             | number         | 限制是否继续重试的时间,若之前的请求和重试请求花费太多时间就不再继续重试。当设置为 `0` 时,表示不启用重试超时机制。                                                                                                                                                                                                 |                                                  |
-| timeout        | 否                                             | 超时时间对象   | 设置连接、发送消息、接收消息的超时时间,以秒为单位。                                                                                                                                                                                                                                                                                                      |                                                  |
+| timeout        | 否                                             | 超时时间对象   | 设置连接、发送消息、接收消息的超时时间,以秒为单位。| `{"connect": 0.5,"send": 0.5,"read": 0.5}` |
 | hash_on        | 否                                             | 辅助           | `hash_on` 支持的类型有 `vars`(NGINX 内置变量),`header`(自定义 header),`cookie`,`consumer`,默认值为 `vars`。                                                                                                                                                                                                                                           |
 | name           | 否                                             | 辅助           | 标识上游服务名称、使用场景等。                                                                                                                                                                                                                                                                                                                              |                                                  |
 | desc           | 否                                             | 辅助           | 上游服务描述、使用场景等。                                                                                                                                                                                                                                                                                                                                  |                                                  |