kayx23 commented on code in PR #8867: URL: https://github.com/apache/apisix/pull/8867#discussion_r1355873290
##########
docs/en/latest/admin-api.md:
##########
@@ -887,30 +887,30 @@ For notes on ID syntax please refer to: [ID
Syntax](#quick-note-on-id-syntax)
In addition to the equalization algorithm selections, Upstream also supports
passive health check and retry for the upstream. See the table below for more
details:
-| Name | Optional |
Description
| Example
|
-| --------------------------- | -------------------------------------------
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
------------------------------------------------------------------------------------------------------------------------------------------
|
-| type | optional |
Load balancing algorithm to be used, and the default value is `roundrobin`.
|
|
-| nodes | required, can't be used with `service_name` |
IP addresses (with optional ports) of the Upstream nodes represented as a hash
table or an array. In the hash table, the key is the IP address and the value
is the weight of the node for the load balancing algorithm. For hash table
case, if the key is IPv6 address with port, then the IPv6 address must be
quoted with square brackets. In the array, each item is a hash table with keys
`host`, `weight`, and the optional `port` and `priority`. Empty nodes are
treated as placeholders and clients trying to access this Upstream will receive
a 502 response.
| `192.168.1.100:80`, `[::1]:80`
|
-| service_name | required, can't be used with `nodes` |
Service name used for [service discovery](discovery.md).
|
`a-bootiful-client`
|
-| discovery_type | required, if `service_name` is used |
The type of service [discovery](discovery.md).
| `eureka`
|
-| 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 parameter, and
`cookie name` can be customized. When `hash_on` is set to `consumer`, `key`
need not be set and the `key` used by the hash algorithm would be the
authenticated `consumer_name`. | `uri`, `server_name`, `server_addr`,
`request_uri`, `remote_port`, `remote_addr`, `query_string`, `host`,
`hostname`, `arg_***`, `arg_***` |
-| 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. | `{"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`.
|
|
-| upstream_host | optional |
Specifies the host of the Upstream request. This is only valid if the
`pass_host` is set to `rewrite`.
|
|
-| scheme | optional |
The scheme used when communicating with the Upstream. For an L7 proxy, this
value can be one of `http`, `https`, `grpc`, `grpcs`. For an L4 proxy, this
value could be one of `tcp`, `udp`, `tls`. Defaults to `http`.
|
|
-| labels | optional |
Attributes of the Upstream specified as `key-value` pairs.
|
{"version":"v2","build":"16","env":"production"}
|
-| tls.client_cert | optional, can't be used with
`tls.client_cert_id` | Sets the client certificate while connecting to a
TLS Upstream.
|
|
-| tls.client_key | optional, can't be used with
`tls.client_cert_id` | Sets the client private key while connecting to a
TLS Upstream.
|
|
-| tls.client_cert_id | optional, can't be used with `tls.client_cert`
and `tls.client_key` | Set the referenced [SSL](#ssl) id.
|
|
-| keepalive_pool.size | optional |
Sets `keepalive` directive dynamically.
|
|
-| keepalive_pool.idle_timeout | optional |
Sets `keepalive_timeout` directive dynamically.
|
|
-| keepalive_pool.requests | optional |
Sets `keepalive_requests` directive dynamically.
|
|
+| Parameter | Required
| Type | Description
| Example
|
+|-----------------------------|------------------------------------------------------------------|-------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
+| type | False
| Enumeration | Load balancing algorithm to
be used, and the default value is `roundrobin`.
|
|
+| nodes | True, can't be used with `service_name`
| Node | IP addresses (with optional
ports) of the Upstream nodes represented as a hash table or an array. In the
hash table, the key is the IP address and the value is the weight of the node
for the load balancing algorithm. For hash table case, if the key is IPv6
address with port, then the IPv6 address must be quoted with square brackets.
In the array, each item is a hash table with keys `host`, `weight`, and the
optional `port` and `priority`. Empty nodes are treated as placeholders and
clients trying to access this Upstream will receive a 502 response.
| `192.168.1.100:80`, `[::1]:80`
|
+| service_name | True, can't be used with `nodes`
| string | Service name used for
[service discovery](discovery.md).
| `a-bootiful-client`
|
Review Comment:
```suggestion
| service_name | True, can't be used with `nodes`
| String | Service name used for
[service discovery](discovery.md).
| `a-bootiful-client`
|
```
##########
docs/en/latest/admin-api.md:
##########
@@ -887,30 +887,30 @@ For notes on ID syntax please refer to: [ID
Syntax](#quick-note-on-id-syntax)
In addition to the equalization algorithm selections, Upstream also supports
passive health check and retry for the upstream. See the table below for more
details:
-| Name | Optional |
Description
| Example
|
-| --------------------------- | -------------------------------------------
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
------------------------------------------------------------------------------------------------------------------------------------------
|
-| type | optional |
Load balancing algorithm to be used, and the default value is `roundrobin`.
|
|
-| nodes | required, can't be used with `service_name` |
IP addresses (with optional ports) of the Upstream nodes represented as a hash
table or an array. In the hash table, the key is the IP address and the value
is the weight of the node for the load balancing algorithm. For hash table
case, if the key is IPv6 address with port, then the IPv6 address must be
quoted with square brackets. In the array, each item is a hash table with keys
`host`, `weight`, and the optional `port` and `priority`. Empty nodes are
treated as placeholders and clients trying to access this Upstream will receive
a 502 response.
| `192.168.1.100:80`, `[::1]:80`
|
-| service_name | required, can't be used with `nodes` |
Service name used for [service discovery](discovery.md).
|
`a-bootiful-client`
|
-| discovery_type | required, if `service_name` is used |
The type of service [discovery](discovery.md).
| `eureka`
|
-| 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 parameter, and
`cookie name` can be customized. When `hash_on` is set to `consumer`, `key`
need not be set and the `key` used by the hash algorithm would be the
authenticated `consumer_name`. | `uri`, `server_name`, `server_addr`,
`request_uri`, `remote_port`, `remote_addr`, `query_string`, `host`,
`hostname`, `arg_***`, `arg_***` |
-| 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. | `{"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`.
|
|
-| upstream_host | optional |
Specifies the host of the Upstream request. This is only valid if the
`pass_host` is set to `rewrite`.
|
|
-| scheme | optional |
The scheme used when communicating with the Upstream. For an L7 proxy, this
value can be one of `http`, `https`, `grpc`, `grpcs`. For an L4 proxy, this
value could be one of `tcp`, `udp`, `tls`. Defaults to `http`.
|
|
-| labels | optional |
Attributes of the Upstream specified as `key-value` pairs.
|
{"version":"v2","build":"16","env":"production"}
|
-| tls.client_cert | optional, can't be used with
`tls.client_cert_id` | Sets the client certificate while connecting to a
TLS Upstream.
|
|
-| tls.client_key | optional, can't be used with
`tls.client_cert_id` | Sets the client private key while connecting to a
TLS Upstream.
|
|
-| tls.client_cert_id | optional, can't be used with `tls.client_cert`
and `tls.client_key` | Set the referenced [SSL](#ssl) id.
|
|
-| keepalive_pool.size | optional |
Sets `keepalive` directive dynamically.
|
|
-| keepalive_pool.idle_timeout | optional |
Sets `keepalive_timeout` directive dynamically.
|
|
-| keepalive_pool.requests | optional |
Sets `keepalive_requests` directive dynamically.
|
|
+| Parameter | Required
| Type | Description
| Example
|
+|-----------------------------|------------------------------------------------------------------|-------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
+| type | False
| Enumeration | Load balancing algorithm to
be used, and the default value is `roundrobin`.
|
|
+| nodes | True, can't be used with `service_name`
| Node | IP addresses (with optional
ports) of the Upstream nodes represented as a hash table or an array. In the
hash table, the key is the IP address and the value is the weight of the node
for the load balancing algorithm. For hash table case, if the key is IPv6
address with port, then the IPv6 address must be quoted with square brackets.
In the array, each item is a hash table with keys `host`, `weight`, and the
optional `port` and `priority`. Empty nodes are treated as placeholders and
clients trying to access this Upstream will receive a 502 response.
| `192.168.1.100:80`, `[::1]:80`
|
+| service_name | True, can't be used with `nodes`
| string | Service name used for
[service discovery](discovery.md).
| `a-bootiful-client`
|
+| discovery_type | True, if `service_name` is used
| string | The type of service
[discovery](discovery.md).
| `eureka`
|
Review Comment:
```suggestion
| discovery_type | True, if `service_name` is used
| String | The type of service
[discovery](discovery.md).
| `eureka`
|
```
##########
docs/en/latest/admin-api.md:
##########
@@ -887,30 +887,30 @@ For notes on ID syntax please refer to: [ID
Syntax](#quick-note-on-id-syntax)
In addition to the equalization algorithm selections, Upstream also supports
passive health check and retry for the upstream. See the table below for more
details:
-| Name | Optional |
Description
| Example
|
-| --------------------------- | -------------------------------------------
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
------------------------------------------------------------------------------------------------------------------------------------------
|
-| type | optional |
Load balancing algorithm to be used, and the default value is `roundrobin`.
|
|
-| nodes | required, can't be used with `service_name` |
IP addresses (with optional ports) of the Upstream nodes represented as a hash
table or an array. In the hash table, the key is the IP address and the value
is the weight of the node for the load balancing algorithm. For hash table
case, if the key is IPv6 address with port, then the IPv6 address must be
quoted with square brackets. In the array, each item is a hash table with keys
`host`, `weight`, and the optional `port` and `priority`. Empty nodes are
treated as placeholders and clients trying to access this Upstream will receive
a 502 response.
| `192.168.1.100:80`, `[::1]:80`
|
-| service_name | required, can't be used with `nodes` |
Service name used for [service discovery](discovery.md).
|
`a-bootiful-client`
|
-| discovery_type | required, if `service_name` is used |
The type of service [discovery](discovery.md).
| `eureka`
|
-| 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 parameter, and
`cookie name` can be customized. When `hash_on` is set to `consumer`, `key`
need not be set and the `key` used by the hash algorithm would be the
authenticated `consumer_name`. | `uri`, `server_name`, `server_addr`,
`request_uri`, `remote_port`, `remote_addr`, `query_string`, `host`,
`hostname`, `arg_***`, `arg_***` |
-| 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. | `{"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`.
|
|
-| upstream_host | optional |
Specifies the host of the Upstream request. This is only valid if the
`pass_host` is set to `rewrite`.
|
|
-| scheme | optional |
The scheme used when communicating with the Upstream. For an L7 proxy, this
value can be one of `http`, `https`, `grpc`, `grpcs`. For an L4 proxy, this
value could be one of `tcp`, `udp`, `tls`. Defaults to `http`.
|
|
-| labels | optional |
Attributes of the Upstream specified as `key-value` pairs.
|
{"version":"v2","build":"16","env":"production"}
|
-| tls.client_cert | optional, can't be used with
`tls.client_cert_id` | Sets the client certificate while connecting to a
TLS Upstream.
|
|
-| tls.client_key | optional, can't be used with
`tls.client_cert_id` | Sets the client private key while connecting to a
TLS Upstream.
|
|
-| tls.client_cert_id | optional, can't be used with `tls.client_cert`
and `tls.client_key` | Set the referenced [SSL](#ssl) id.
|
|
-| keepalive_pool.size | optional |
Sets `keepalive` directive dynamically.
|
|
-| keepalive_pool.idle_timeout | optional |
Sets `keepalive_timeout` directive dynamically.
|
|
-| keepalive_pool.requests | optional |
Sets `keepalive_requests` directive dynamically.
|
|
+| Parameter | Required
| Type | Description
| Example
|
+|-----------------------------|------------------------------------------------------------------|-------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
+| type | False
| Enumeration | Load balancing algorithm to
be used, and the default value is `roundrobin`.
|
|
+| nodes | True, can't be used with `service_name`
| Node | IP addresses (with optional
ports) of the Upstream nodes represented as a hash table or an array. In the
hash table, the key is the IP address and the value is the weight of the node
for the load balancing algorithm. For hash table case, if the key is IPv6
address with port, then the IPv6 address must be quoted with square brackets.
In the array, each item is a hash table with keys `host`, `weight`, and the
optional `port` and `priority`. Empty nodes are treated as placeholders and
clients trying to access this Upstream will receive a 502 response.
| `192.168.1.100:80`, `[::1]:80`
|
+| service_name | True, can't be used with `nodes`
| string | Service name used for
[service discovery](discovery.md).
| `a-bootiful-client`
|
+| discovery_type | True, if `service_name` is used
| string | The type of service
[discovery](discovery.md).
| `eureka`
|
+| hash_on | False
| Auxiliary | Only valid if the `type` is
`chash`. Supports Nginx variables (`vars`), custom headers (`header`), `cookie`
and `consumer`. Defaults to `vars`.
|
|
+| key | False
| Match Rules | 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
parameter, and `cookie name` can be customized. When `hash_on` is set to
`consumer`, `key` need not be set and the `key` used by the hash algorithm
would be the authenticated `consumer_name`. | `uri`, `server_name`,
`server_addr`, `request_uri`, `remote_port`, `remote_addr`, `query_string`,
`host`, `hostname`, `arg_***`, `arg_***` |
+| checks | False
| health_checker | Configures the parameters
for the [health check](./tutorials/health-check.md).
|
|
+| retries | False
| Integer | 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 | False
| Integer | Timeout to continue with
retries. Setting this to `0` disables the retry timeout.
|
|
+| timeout | False
| Timeout | 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 | False
| Auxiliary | Identifier for the
Upstream.
|
|
+| desc | False
| Auxiliary | Description of usage
scenarios.
|
|
+| pass_host | False
| Enumeration | 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`.
|
|
+| upstream_host | False
| Auxiliary | Specifies the host of the
Upstream request. This is only valid if the `pass_host` is set to `rewrite`.
|
|
+| scheme | False
| Auxiliary | The scheme used when
communicating with the Upstream. For an L7 proxy, this value can be one of
`http`, `https`, `grpc`, `grpcs`. For an L4 proxy, this value could be one of
`tcp`, `udp`, `tls`. Defaults to `http`.
|
|
+| labels | False
| Match Rules | Attributes of the Upstream
specified as `key-value` pairs.
| {"version":"v2","build":"16","env":"production"}
|
+| tls.client_cert | False, can't be used with `tls.client_cert_id`
| HTTPS certificate | Sets the client certificate
while connecting to a TLS Upstream.
|
|
+| tls.client_key | False, can't be used with `tls.client_cert_id`
| https certificate private key | Sets the client private key
while connecting to a TLS Upstream.
|
|
Review Comment:
```suggestion
| tls.client_key | False, can't be used with
`tls.client_cert_id` | HTTPS certificate private key | Sets
the client private key while connecting to a TLS Upstream.
|
|
```
##########
docs/en/latest/admin-api.md:
##########
@@ -887,30 +887,30 @@ For notes on ID syntax please refer to: [ID
Syntax](#quick-note-on-id-syntax)
In addition to the equalization algorithm selections, Upstream also supports
passive health check and retry for the upstream. See the table below for more
details:
-| Name | Optional |
Description
| Example
|
-| --------------------------- | -------------------------------------------
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
------------------------------------------------------------------------------------------------------------------------------------------
|
-| type | optional |
Load balancing algorithm to be used, and the default value is `roundrobin`.
|
|
-| nodes | required, can't be used with `service_name` |
IP addresses (with optional ports) of the Upstream nodes represented as a hash
table or an array. In the hash table, the key is the IP address and the value
is the weight of the node for the load balancing algorithm. For hash table
case, if the key is IPv6 address with port, then the IPv6 address must be
quoted with square brackets. In the array, each item is a hash table with keys
`host`, `weight`, and the optional `port` and `priority`. Empty nodes are
treated as placeholders and clients trying to access this Upstream will receive
a 502 response.
| `192.168.1.100:80`, `[::1]:80`
|
-| service_name | required, can't be used with `nodes` |
Service name used for [service discovery](discovery.md).
|
`a-bootiful-client`
|
-| discovery_type | required, if `service_name` is used |
The type of service [discovery](discovery.md).
| `eureka`
|
-| 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 parameter, and
`cookie name` can be customized. When `hash_on` is set to `consumer`, `key`
need not be set and the `key` used by the hash algorithm would be the
authenticated `consumer_name`. | `uri`, `server_name`, `server_addr`,
`request_uri`, `remote_port`, `remote_addr`, `query_string`, `host`,
`hostname`, `arg_***`, `arg_***` |
-| 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. | `{"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`.
|
|
-| upstream_host | optional |
Specifies the host of the Upstream request. This is only valid if the
`pass_host` is set to `rewrite`.
|
|
-| scheme | optional |
The scheme used when communicating with the Upstream. For an L7 proxy, this
value can be one of `http`, `https`, `grpc`, `grpcs`. For an L4 proxy, this
value could be one of `tcp`, `udp`, `tls`. Defaults to `http`.
|
|
-| labels | optional |
Attributes of the Upstream specified as `key-value` pairs.
|
{"version":"v2","build":"16","env":"production"}
|
-| tls.client_cert | optional, can't be used with
`tls.client_cert_id` | Sets the client certificate while connecting to a
TLS Upstream.
|
|
-| tls.client_key | optional, can't be used with
`tls.client_cert_id` | Sets the client private key while connecting to a
TLS Upstream.
|
|
-| tls.client_cert_id | optional, can't be used with `tls.client_cert`
and `tls.client_key` | Set the referenced [SSL](#ssl) id.
|
|
-| keepalive_pool.size | optional |
Sets `keepalive` directive dynamically.
|
|
-| keepalive_pool.idle_timeout | optional |
Sets `keepalive_timeout` directive dynamically.
|
|
-| keepalive_pool.requests | optional |
Sets `keepalive_requests` directive dynamically.
|
|
+| Parameter | Required
| Type | Description
| Example
|
+|-----------------------------|------------------------------------------------------------------|-------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
+| type | False
| Enumeration | Load balancing algorithm to
be used, and the default value is `roundrobin`.
|
|
+| nodes | True, can't be used with `service_name`
| Node | IP addresses (with optional
ports) of the Upstream nodes represented as a hash table or an array. In the
hash table, the key is the IP address and the value is the weight of the node
for the load balancing algorithm. For hash table case, if the key is IPv6
address with port, then the IPv6 address must be quoted with square brackets.
In the array, each item is a hash table with keys `host`, `weight`, and the
optional `port` and `priority`. Empty nodes are treated as placeholders and
clients trying to access this Upstream will receive a 502 response.
| `192.168.1.100:80`, `[::1]:80`
|
+| service_name | True, can't be used with `nodes`
| string | Service name used for
[service discovery](discovery.md).
| `a-bootiful-client`
|
+| discovery_type | True, if `service_name` is used
| string | The type of service
[discovery](discovery.md).
| `eureka`
|
+| hash_on | False
| Auxiliary | Only valid if the `type` is
`chash`. Supports Nginx variables (`vars`), custom headers (`header`), `cookie`
and `consumer`. Defaults to `vars`.
|
|
+| key | False
| Match Rules | 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
parameter, and `cookie name` can be customized. When `hash_on` is set to
`consumer`, `key` need not be set and the `key` used by the hash algorithm
would be the authenticated `consumer_name`. | `uri`, `server_name`,
`server_addr`, `request_uri`, `remote_port`, `remote_addr`, `query_string`,
`host`, `hostname`, `arg_***`, `arg_***` |
+| checks | False
| health_checker | Configures the parameters
for the [health check](./tutorials/health-check.md).
|
|
Review Comment:
```suggestion
| checks | False
| Health Checker | Configures the parameters
for the [health check](./tutorials/health-check.md).
|
|
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
