You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/09/22 14:26:20 UTC

[GitHub] [apisix] shuaijinchao opened a new pull request #5117: docs: supplementary health check documents

shuaijinchao opened a new pull request #5117:
URL: https://github.com/apache/apisix/pull/5117


   ### What this PR does / why we need it:
   Supplementary health check documents.
   
   ### Pre-submission checklist:
   
   * [x] Did you explain what problem does this PR solve? Or what new features have been added?
   * [ ] Have you added corresponding test cases?
   * [x] Have you modified the corresponding document?
   * [ ] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix/tree/master#community) first**
   


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on a change in pull request #5117: docs: supplementary health check documents

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #5117:
URL: https://github.com/apache/apisix/pull/5117#discussion_r715253476



##########
File path: docs/en/latest/health-check.md
##########
@@ -35,7 +34,34 @@ There won't be any health check if an upstream is configured but isn't in used.
 it whether this unique node is healthy or not.
 * Active health check is required so that the unhealthy node can recover.
 
-The following is an example of health check:
+### Configuration instructions
+
+| Configuration item                              | Configuration type              | Value type | Value option         | Defaults                                                                                      | Description                                                                                                          |
+| ----------------------------------------------- | ------------------------------- | ---------- | -------------------- | --------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
+| upstream.checks.active.type                     | Active check                    | string     | `http` `https` `tcp` | http                                                                                          | The type of active check.                                                                                            |
+| upstream.checks.active.timeout                  | Active check                    | integer    |                      | 1                                                                                             | The timeout period of the active check (unit: second).                                                               |
+| upstream.checks.active.concurrency              | Active check                    | integer    |                      | 10                                                                                            | The number of targets to be checked at the same time during the active check.                                        |
+| upstream.checks.active.http_path                | Active check                    | string     |                      | /                                                                                             | The HTTP request path that is actively checked.                                                                      |
+| upstream.checks.active.host                     | Active check                    | string     |                      | ${upstream.node.host}                                                                         | The hostname of the HTTP request actively checked.                                                                   |
+| upstream.checks.active.port                     | Active check                    | integer    | `1` to `65535`       | ${upstream.node.port}                                                                         | The host port of the HTTP request that is actively checked.                                                          |
+| upstream.checks.active.https_verify_certificate | Active check                    | boolean    |                      | true                                                                                          | Active check whether to check the SSL certificate of the remote host when HTTPS type checking is used.               |
+| upstream.checks.active.req_headers              | Active check                    | array      |                      | []                                                                                            | Active check When using HTTP or HTTPS type checking, set additional request header information.                      |
+| upstream.checks.active.healthy.interval         | Active check (healthy node)    | integer    | `>= 1`               | 1                                                                                             | Active check (healthy node) check interval (unit: second)                                                            |
+| upstream.checks.active.healthy.http_statuses    | Active check (healthy node)    | array      | `200` to `599`       | [200, 302]                                                                                    | Active check (healthy node) HTTP or HTTPS type check, the HTTP status code of the healthy node.                      |
+| upstream.checks.active.healthy.successes        | Active check (healthy node)    | integer    | `1` to `254`         | 2                                                                                             | Active check (healthy node) determine the number of times a node is healthy.                                         |
+| upstream.checks.active.unhealthy.interval       | Active check (unhealthy node)  | integer    | `>= 1`               | 1                                                                                             | Active check (unhealthy node) check interval (unit: second)                                                          |
+| upstream.checks.active.unhealthy.http_statuses  | Active check (unhealthy node)  | array      | `200` to `599`       | [429, 404, 500, 501, 502, 503, 504, 505]                                                      | Active check (unhealthy node) HTTP or HTTPS type check, the HTTP status code of the non-healthy node.                |
+| upstream.checks.active.unhealthy.http_failures  | Active check (unhealthy node)  | integer    | `1` to `254`         | 5                                                                                             | Active check (unhealthy node) HTTP or HTTPS type check, determine the number of times that the node is not healthy.  |
+| upstream.checks.active.unhealthy.tcp_failures   | Active check (unhealthy node)  | integer    | `1` to `254`         | 2                                                                                             | Active check (unhealthy node) TCP type check, determine the number of times that the node is not healthy.            |
+| upstream.checks.active.unhealthy.timeouts       | Active check (unhealthy node)  | integer    | `1` to `254`         | 3                                                                                             | Active check (unhealthy node) to determine the number of timeouts for unhealthy nodes.                              |
+| upstream.checks.passive.healthy.http_statuses   | Passive check (healthy node)   | array      | `200` to `599`       | [200, 201, 202, 203, 204, 205, 206, 207,208, 226, 300, 301, 302, 303, 304, 305,306, 307, 308] | Passive check (healthy node) HTTP or HTTPS type check, the HTTP status code of the healthy node.                     |

Review comment:
       ```suggestion
   | upstream.checks.passive.healthy.http_statuses   | Passive check (healthy node)   | array      | `200` to `599`       | [200, 201, 202, 203, 204, 205, 206, 207, 208, 226, 300, 301, 302, 303, 304, 305, 306, 307, 308] | Passive check (healthy node) HTTP or HTTPS type check, the HTTP status code of the healthy node.                     |
   ```




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on a change in pull request #5117: docs: supplementary health check documents

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #5117:
URL: https://github.com/apache/apisix/pull/5117#discussion_r714728405



##########
File path: docs/en/latest/health-check.md
##########
@@ -91,21 +91,26 @@ The configures in `checks` are belong to health check, the type of `checks`
 contains: `active` or `passive`.
 
 * `active`: To enable active health checks, you need to specify the configuration items under `checks.active` in the Upstream object configuration.
-
+  * `active.type`: The type of active health check, supports `http`, `https`, `tcp`, default: `http`.
   * `active.timeout`: Socket timeout for active checks (in seconds), support decimals. For example `1.01` means `1010` milliseconds, `2` means `2000` milliseconds.
-
+  * `active.concurrency`: Number of targets to check concurrently in active health checks, default: `10`.
   * `active.http_path`: The HTTP GET request path used to detect if the upstream is healthy.
   * `active.host`: The HTTP request host used to detect if the upstream is healthy.
   * `active.port`: The customize health check host port (optional), this will override the port in the `upstream` node.
+  * `active.https_verify_certificate`: Whether to check the validity of the SSL certificate of the remote host when performing active health checks using HTTPS. default: `true`.
+  * `active.req_headers`: When the active health check sends an HTTP check request, additional request header information, array format, supports setting multiple request headers.
 
   The threshold fields of `healthy` are:
   * `active.healthy.interval`: Interval between health checks for healthy targets (in seconds), the minimum is 1.
+  * `active.healthy.http_statuses`: When using an HTTP request to check the health status of a node, if the response status code matches the set status code, the node is set to the `healthy` status, array format, default: `[200, 302]`.
   * `active.healthy.successes`: The number of success times to determine the target is healthy, the minimum is 1.
 
   The threshold fields of  `unhealthy` are:
   * `active.unhealthy.interval`: Interval between health checks for unhealthy targets (in seconds), the minimum is 1.
-  * `active.unhealthy.http_failures`: The number of http failures times to determine the target is unhealthy, the minimum is 1.
-  * `active.req_headers`: Additional request headers. Array format, so you can fill in multiple headers.
+  * `active.unhealthy.http_statuses`: When using an HTTP request to check the health status of a node, if the response status code matches the set status code, the node is set to the `unhealthy` status, array format, default: `[429, 404, 500, 501, 502, 503, 504, 505]`。
+  * `active.unhealthy.http_failures`: Determine the number of unhealthy http request failures on the target node, default: `5`.
+  * `active.unhealthy.tcp_failures`: Determine the number of unhealthy tcp request failures on the target node, default: `5`.

Review comment:
       ```suggestion
     * `active.unhealthy.tcp_failures`: Determine the number of unhealthy tcp request failures on the target node, default: `2`.
   ```




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] shuaijinchao commented on a change in pull request #5117: docs: supplementary health check documents

Posted by GitBox <gi...@apache.org>.
shuaijinchao commented on a change in pull request #5117:
URL: https://github.com/apache/apisix/pull/5117#discussion_r714666345



##########
File path: docs/en/latest/health-check.md
##########
@@ -91,12 +91,13 @@ The configures in `checks` are belong to health check, the type of `checks`
 contains: `active` or `passive`.
 
 * `active`: To enable active health checks, you need to specify the configuration items under `checks.active` in the Upstream object configuration.
-
+  * `active.type`: The type of active health check, supports `http`, `https`, `tcp`, default: `http`.
   * `active.timeout`: Socket timeout for active checks (in seconds), support decimals. For example `1.01` means `1010` milliseconds, `2` means `2000` milliseconds.
-
+  * `active.concurrency`: Number of targets to check concurrently in active health checks, default: `10`.
   * `active.http_path`: The HTTP GET request path used to detect if the upstream is healthy.
   * `active.host`: The HTTP request host used to detect if the upstream is healthy.
   * `active.port`: The customize health check host port (optional), this will override the port in the `upstream` node.
+  * `active.https_verify_certificate`: Whether to check the validity of the SSL certificate of the remote host when performing active health checks using HTTPS. Default: `true`.

Review comment:
       done




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] shuaijinchao commented on a change in pull request #5117: docs: supplementary health check documents

Posted by GitBox <gi...@apache.org>.
shuaijinchao commented on a change in pull request #5117:
URL: https://github.com/apache/apisix/pull/5117#discussion_r715250023



##########
File path: docs/en/latest/health-check.md
##########
@@ -91,21 +91,26 @@ The configures in `checks` are belong to health check, the type of `checks`
 contains: `active` or `passive`.
 
 * `active`: To enable active health checks, you need to specify the configuration items under `checks.active` in the Upstream object configuration.
-
+  * `active.type`: The type of active health check, supports `http`, `https`, `tcp`, default: `http`.
   * `active.timeout`: Socket timeout for active checks (in seconds), support decimals. For example `1.01` means `1010` milliseconds, `2` means `2000` milliseconds.
-
+  * `active.concurrency`: Number of targets to check concurrently in active health checks, default: `10`.
   * `active.http_path`: The HTTP GET request path used to detect if the upstream is healthy.
   * `active.host`: The HTTP request host used to detect if the upstream is healthy.
   * `active.port`: The customize health check host port (optional), this will override the port in the `upstream` node.
+  * `active.https_verify_certificate`: Whether to check the validity of the SSL certificate of the remote host when performing active health checks using HTTPS. default: `true`.
+  * `active.req_headers`: When the active health check sends an HTTP check request, additional request header information, array format, supports setting multiple request headers.
 
   The threshold fields of `healthy` are:
   * `active.healthy.interval`: Interval between health checks for healthy targets (in seconds), the minimum is 1.
+  * `active.healthy.http_statuses`: When using an HTTP request to check the health status of a node, if the response status code matches the set status code, the node is set to the `healthy` status, array format, default: `[200, 302]`.
   * `active.healthy.successes`: The number of success times to determine the target is healthy, the minimum is 1.
 
   The threshold fields of  `unhealthy` are:
   * `active.unhealthy.interval`: Interval between health checks for unhealthy targets (in seconds), the minimum is 1.
-  * `active.unhealthy.http_failures`: The number of http failures times to determine the target is unhealthy, the minimum is 1.
-  * `active.req_headers`: Additional request headers. Array format, so you can fill in multiple headers.
+  * `active.unhealthy.http_statuses`: When using an HTTP request to check the health status of a node, if the response status code matches the set status code, the node is set to the `unhealthy` status, array format, default: `[429, 404, 500, 501, 502, 503, 504, 505]`。
+  * `active.unhealthy.http_failures`: Determine the number of unhealthy http request failures on the target node, default: `5`.
+  * `active.unhealthy.tcp_failures`: Determine the number of unhealthy tcp request failures on the target node, default: `5`.

Review comment:
       done




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] shuaijinchao commented on pull request #5117: docs: supplementary health check documents

Posted by GitBox <gi...@apache.org>.
shuaijinchao commented on pull request #5117:
URL: https://github.com/apache/apisix/pull/5117#issuecomment-924990144


   https://github.com/apache/apisix/blob/0ba89d5c0f9dc2863329a8fa6552c380453627cf/apisix/schema_def.lua#L131-L145


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] shuaijinchao commented on a change in pull request #5117: docs: supplementary health check documents

Posted by GitBox <gi...@apache.org>.
shuaijinchao commented on a change in pull request #5117:
URL: https://github.com/apache/apisix/pull/5117#discussion_r715255186



##########
File path: docs/en/latest/health-check.md
##########
@@ -35,7 +34,34 @@ There won't be any health check if an upstream is configured but isn't in used.
 it whether this unique node is healthy or not.
 * Active health check is required so that the unhealthy node can recover.
 
-The following is an example of health check:
+### Configuration instructions
+
+| Configuration item                              | Configuration type              | Value type | Value option         | Defaults                                                                                      | Description                                                                                                          |
+| ----------------------------------------------- | ------------------------------- | ---------- | -------------------- | --------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
+| upstream.checks.active.type                     | Active check                    | string     | `http` `https` `tcp` | http                                                                                          | The type of active check.                                                                                            |
+| upstream.checks.active.timeout                  | Active check                    | integer    |                      | 1                                                                                             | The timeout period of the active check (unit: second).                                                               |
+| upstream.checks.active.concurrency              | Active check                    | integer    |                      | 10                                                                                            | The number of targets to be checked at the same time during the active check.                                        |
+| upstream.checks.active.http_path                | Active check                    | string     |                      | /                                                                                             | The HTTP request path that is actively checked.                                                                      |
+| upstream.checks.active.host                     | Active check                    | string     |                      | ${upstream.node.host}                                                                         | The hostname of the HTTP request actively checked.                                                                   |
+| upstream.checks.active.port                     | Active check                    | integer    | `1` to `65535`       | ${upstream.node.port}                                                                         | The host port of the HTTP request that is actively checked.                                                          |
+| upstream.checks.active.https_verify_certificate | Active check                    | boolean    |                      | true                                                                                          | Active check whether to check the SSL certificate of the remote host when HTTPS type checking is used.               |
+| upstream.checks.active.req_headers              | Active check                    | array      |                      | []                                                                                            | Active check When using HTTP or HTTPS type checking, set additional request header information.                      |
+| upstream.checks.active.healthy.interval         | Active check (healthy node)    | integer    | `>= 1`               | 1                                                                                             | Active check (healthy node) check interval (unit: second)                                                            |
+| upstream.checks.active.healthy.http_statuses    | Active check (healthy node)    | array      | `200` to `599`       | [200, 302]                                                                                    | Active check (healthy node) HTTP or HTTPS type check, the HTTP status code of the healthy node.                      |
+| upstream.checks.active.healthy.successes        | Active check (healthy node)    | integer    | `1` to `254`         | 2                                                                                             | Active check (healthy node) determine the number of times a node is healthy.                                         |
+| upstream.checks.active.unhealthy.interval       | Active check (unhealthy node)  | integer    | `>= 1`               | 1                                                                                             | Active check (unhealthy node) check interval (unit: second)                                                          |
+| upstream.checks.active.unhealthy.http_statuses  | Active check (unhealthy node)  | array      | `200` to `599`       | [429, 404, 500, 501, 502, 503, 504, 505]                                                      | Active check (unhealthy node) HTTP or HTTPS type check, the HTTP status code of the non-healthy node.                |
+| upstream.checks.active.unhealthy.http_failures  | Active check (unhealthy node)  | integer    | `1` to `254`         | 5                                                                                             | Active check (unhealthy node) HTTP or HTTPS type check, determine the number of times that the node is not healthy.  |
+| upstream.checks.active.unhealthy.tcp_failures   | Active check (unhealthy node)  | integer    | `1` to `254`         | 2                                                                                             | Active check (unhealthy node) TCP type check, determine the number of times that the node is not healthy.            |
+| upstream.checks.active.unhealthy.timeouts       | Active check (unhealthy node)  | integer    | `1` to `254`         | 3                                                                                             | Active check (unhealthy node) to determine the number of timeouts for unhealthy nodes.                              |
+| upstream.checks.passive.healthy.http_statuses   | Passive check (healthy node)   | array      | `200` to `599`       | [200, 201, 202, 203, 204, 205, 206, 207,208, 226, 300, 301, 302, 303, 304, 305,306, 307, 308] | Passive check (healthy node) HTTP or HTTPS type check, the HTTP status code of the healthy node.                     |

Review comment:
       done




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander merged pull request #5117: docs: supplementary health check documents

Posted by GitBox <gi...@apache.org>.
spacewander merged pull request #5117:
URL: https://github.com/apache/apisix/pull/5117


   


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on a change in pull request #5117: docs: supplementary health check documents

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #5117:
URL: https://github.com/apache/apisix/pull/5117#discussion_r714416089



##########
File path: docs/en/latest/health-check.md
##########
@@ -91,12 +91,13 @@ The configures in `checks` are belong to health check, the type of `checks`
 contains: `active` or `passive`.
 
 * `active`: To enable active health checks, you need to specify the configuration items under `checks.active` in the Upstream object configuration.
-
+  * `active.type`: The type of active health check, supports `http`, `https`, `tcp`, default: `http`.
   * `active.timeout`: Socket timeout for active checks (in seconds), support decimals. For example `1.01` means `1010` milliseconds, `2` means `2000` milliseconds.
-
+  * `active.concurrency`: Number of targets to check concurrently in active health checks, default: `10`.
   * `active.http_path`: The HTTP GET request path used to detect if the upstream is healthy.
   * `active.host`: The HTTP request host used to detect if the upstream is healthy.
   * `active.port`: The customize health check host port (optional), this will override the port in the `upstream` node.
+  * `active.https_verify_certificate`: Whether to check the validity of the SSL certificate of the remote host when performing active health checks using HTTPS. Default: `true`.

Review comment:
       Some fields are still missing, like "http_statuses".




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org