feat: add healthcheck for sync configuration#12200
Conversation
…lthcheck-standalone
…ssup/apisix into revolyssup/healthcheck-standalone
|
|
||
| ```json | ||
| { | ||
| "status": "ok" |
There was a problem hiding this comment.
What if the status is not ok? The section below shows output when its "not ok" - what about this section?
There was a problem hiding this comment.
If APISIX is running, this endpoint will always return 200 and no other response. If APISIX is not running, then it wouldn't return any HTTP response, the request will error out while establishing tcp connection.
There was a problem hiding this comment.
Make sense. Maybe add a sentence at the end of this section?
If APISIX is not running, the request will error out while establishing TCP connection.
wdyt
|
|
||
| Returns `ok` when all workers have loaded the configuration, otherwise returns the specific error with `503` error code. Below are specific examples. | ||
|
|
||
| When all workers have loaded the configuration |
There was a problem hiding this comment.
| When all workers have loaded the configuration | |
| When all workers have loaded the configuration: |
Please do the same for other sentences missing punctuation in this doc.
| # | ||
| --> | ||
|
|
||
| 在 Apache APISIX 中,状态 API 用于: |
There was a problem hiding this comment.
| 在 Apache APISIX 中,状态 API 用于: | |
| 在 Apache APISIX 中,Status API 用于: |
| 在 Apache APISIX 中,状态 API 用于: | ||
|
|
||
| * 检查 APISIX 是否已成功启动并正确运行 | ||
| * 检查所有工作人员是否已收到并加载配置。 |
There was a problem hiding this comment.
| * 检查所有工作人员是否已收到并加载配置。 | |
| * 检查所有 workers 是否已收到配置并加载。 |
|
|
||
| ### GET /status | ||
|
|
||
| 返回报告 APISIX 工作者状态的 JSON |
There was a problem hiding this comment.
| 返回报告 APISIX 工作者状态的 JSON | |
| 返回报告 APISIX worker 状态的 JSON: |
similarly add missing punctuation in this doc
| } | ||
| ``` | ||
|
|
||
| 当特定工作器尚未加载配置时 |
There was a problem hiding this comment.
| 当特定工作器尚未加载配置时 | |
| 当特定 worker 尚未加载配置时: |
|
|
||
| 当所有 Worker 都已加载配置时,返回 `ok`;否则,返回特定错误,错误代码为 `503`。以下是具体示例。 | ||
|
|
||
| 当所有 Worker 都已加载配置时 |
| } | ||
| ``` | ||
|
|
||
| When 1 workers has't been initialised |
There was a problem hiding this comment.
| When 1 workers has't been initialised | |
| When 1 workers has't been initialised: |
| } | ||
| ``` | ||
|
|
||
| When a particular worker hasn't loaded the configuration |
There was a problem hiding this comment.
| When a particular worker hasn't loaded the configuration | |
| When a particular worker hasn't loaded the configuration: |
| 在 Apache APISIX 中,Status API 用于: | ||
|
|
||
| * 检查 APISIX 是否已成功启动并正确运行 | ||
| * 检查所有 workers 是否已收到配置并加载。 |
There was a problem hiding this comment.
| * 检查所有 workers 是否已收到配置并加载。 | |
| * 检查所有 workers 是否已收到配置并加载 |
| } | ||
| ``` | ||
|
|
||
| 当 1 个 workers 尚未初始化时 |
There was a problem hiding this comment.
| 当 1 个 workers 尚未初始化时 | |
| 当 1 个 workers 尚未初始化时: |
|
|
||
| 当所有 worker 都已加载配置时,返回 `ok`;否则,返回特定错误,错误代码为 `503`。以下是具体示例。 | ||
|
|
||
| 当所有 worker 都已加载配置时 |
There was a problem hiding this comment.
| 当所有 worker 都已加载配置时 | |
| 当所有 worker 都已加载配置时: |
kayx23
left a comment
There was a problem hiding this comment.
Others LGTM. Please fix for doc lint errors as well, likely due to punctuations.
| ### GET /status | ||
|
|
||
| 返回报告 APISIX worker 状态的 JSON: | ||
| 返回报告 APISIX 工作人员状态的 JSON。如果 APISIX 未运行,则建立 TCP 连接时请求将出错。否则,如果请求到达正在运行的工作线程,此端点将始终返回 ok |
There was a problem hiding this comment.
| 返回报告 APISIX 工作人员状态的 JSON。如果 APISIX 未运行,则建立 TCP 连接时请求将出错。否则,如果请求到达正在运行的工作线程,此端点将始终返回 ok | |
| 返回报告 APISIX 工作人员状态的 JSON。如果 APISIX 未运行,建立 TCP 连接时请求将报错。否则,如果请求到达正在运行的 worker,此端点将始终返回 ok。 |

Description
Refer: #12179 (review)
Checklist