mirror of
https://gitee.com/iresty/apisix.git
synced 2024-12-03 12:37:36 +08:00
docs: add unit to upstream timeout (#7027)
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
This commit is contained in:
parent
96a5d3ca6b
commit
0957035c10
@ -76,7 +76,7 @@ By default, the Admin API listens to port `9080` (`9443` for HTTPS) when APISIX
|
||||
| service_id | False | Service | Configuration of the bound [Service](terminology/service.md). | |
|
||||
| plugin_config_id | False, can't be used with `script` | Plugin | [Plugin config](terminology/plugin-config.md) bound to the Route. | |
|
||||
| labels | False | Match Rules | Attributes of the Route specified as key-value pairs. | {"version":"v2","build":"16","env":"production"} |
|
||||
| timeout | False | Auxiliary | Sets the timeout for connecting to, and sending and receiving messages between the Upstream and the Route. This will overwrite the `timeout` value configured in your [Upstream](#upstream). | {"connect": 3, "send": 3, "read": 3} |
|
||||
| timeout | False | Auxiliary | Sets the timeout (in seconds) for connecting to, and sending and receiving messages between the Upstream and the Route. This will overwrite the `timeout` value configured in your [Upstream](#upstream). | {"connect": 3, "send": 3, "read": 3} |
|
||||
| enable_websocket | False | Auxiliary | Enables a websocket. Set to `false` by default. | |
|
||||
| status | False | Auxiliary | Enables the current Route. Set to `1` (enabled) by default. | `1` to enable, `0` to disable |
|
||||
| create_time | False | Auxiliary | Epoch timestamp (in seconds) of the created time. If missing, this field will be populated automatically. | 1602883670 |
|
||||
@ -532,7 +532,7 @@ In addition to the equalization algorithm selections, Upstream also supports pas
|
||||
| checks | optional | Configures the parameters for the [health check](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 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. | |
|
||||
| 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`. | |
|
||||
@ -578,7 +578,7 @@ Example Configuration:
|
||||
{
|
||||
"id": "1", # id
|
||||
"retries": 1, # retry times
|
||||
"timeout": { # Set the timeout for connecting, sending and receiving messages.
|
||||
"timeout": { # Set the timeout for connecting, sending and receiving messages, each is 15 seconds.
|
||||
"connect":15,
|
||||
"send":15,
|
||||
"read":15,
|
||||
|
@ -78,7 +78,7 @@ Admin API 是为 Apache APISIX 服务的一组 API,我们可以将参数传递
|
||||
| vars | 可选 | 匹配规则 | 由一个或多个`[var, operator, val]`元素组成的列表,类似这样:`[[var, operator, val], [var, operator, val], ...]]`。例如:`["arg_name", "==", "json"]`,表示当前请求参数 `name` 是 `json`。这里的 `var` 与 Nginx 内部自身变量命名是保持一致,所以也可以使用 `request_uri`、`host` 等。更多细节请参考[lua-resty-expr](https://github.com/api7/lua-resty-expr) | [["arg_name", "==", "json"], ["arg_age", ">", 18]] |
|
||||
| filter_func | 可选 | 匹配规则 | 用户自定义的过滤函数。可以使用它来实现特殊场景的匹配要求实现。该函数默认接受一个名为 vars 的输入参数,可以用它来获取 Nginx 变量。 | function(vars) return vars["arg_name"] == "json" end |
|
||||
| labels | 可选 | 匹配规则 | 标识附加属性的键值对 | {"version":"v2","build":"16","env":"production"} |
|
||||
| timeout | 可选 | 辅助 | 为 route 设置 upstream 的连接、发送消息、接收消息的超时时间。这个配置将会覆盖在 upstream 中 配置的 [timeout](#upstream) 选项 | {"connect": 3, "send": 3, "read": 3} |
|
||||
| timeout | 可选 | 辅助 | 为 route 设置 upstream 的连接、发送消息、接收消息的超时时间(单位为秒)。这个配置将会覆盖在 upstream 中 配置的 [timeout](#upstream) 选项 | {"connect": 3, "send": 3, "read": 3} |
|
||||
| enable_websocket | 可选 | 辅助 | 是否启用 `websocket`(boolean), 缺省 `false`。 | |
|
||||
| status | 可选 | 辅助 | 是否启用此路由,缺省 `1`。 | `1` 表示启用,`0` 表示禁用 |
|
||||
| create_time | 可选 | 辅助 | 单位为秒的 epoch 时间戳,如果不指定则自动创建 | 1602883670 |
|
||||
@ -539,7 +539,7 @@ APISIX 的 Upstream 除了基本的负载均衡算法选择外,还支持对上
|
||||
| checks | 可选 | health_checker | 配置健康检查的参数,详细可参考[health-check](health-check.md) | |
|
||||
| retries | 可选 | 整型 | 使用底层的 Nginx 重试机制将请求传递给下一个上游,默认启用重试且次数为后端可用的 node 数量。如果指定了具体重试次数,它将覆盖默认值。`0` 代表不启用重试机制。 | |
|
||||
| retry_timeout | 可选 | number | 限制是否继续重试的时间,若之前的请求和重试请求花费太多时间就不再继续重试。`0` 代表不启用重试超时机制。 | |
|
||||
| timeout | 可选 | 超时时间对象 | 设置连接、发送消息、接收消息的超时时间 | |
|
||||
| timeout | 可选 | 超时时间对象 | 设置连接、发送消息、接收消息的超时时间(单位为秒) | |
|
||||
| hash_on | 可选 | 辅助 | `hash_on` 支持的类型有 `vars`(Nginx 内置变量),`header`(自定义 header),`cookie`,`consumer`,默认值为 `vars` |
|
||||
| name | 可选 | 辅助 | 标识上游服务名称、使用场景等。 | |
|
||||
| desc | 可选 | 辅助 | 上游服务描述、使用场景等。 | |
|
||||
@ -588,7 +588,7 @@ APISIX 的 Upstream 除了基本的负载均衡算法选择外,还支持对上
|
||||
{
|
||||
"id": "1", # id
|
||||
"retries": 1, # 请求重试次数
|
||||
"timeout": { # 设置连接、发送消息、接收消息的超时时间
|
||||
"timeout": { # 设置连接、发送消息、接收消息的超时时间,每项都为 15 秒
|
||||
"connect":15,
|
||||
"send":15,
|
||||
"read":15,
|
||||
|
Loading…
Reference in New Issue
Block a user