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

juzhiyuan 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 23419dba7 docs(FAQ): add how to detect APISIX alive status (#7812)
23419dba7 is described below

commit 23419dba7a6f9a8aa3b444c46e72435e406fb4fb
Author: soulbird <[email protected]>
AuthorDate: Wed Aug 31 15:20:13 2022 +0800

    docs(FAQ): add how to detect APISIX alive status (#7812)
    
    Co-authored-by: soulbird <[email protected]>
---
 docs/en/latest/FAQ.md | 30 ++++++++++++++++++++++++++++++
 docs/zh/latest/FAQ.md | 30 ++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+)

diff --git a/docs/en/latest/FAQ.md b/docs/en/latest/FAQ.md
index 2e147293f..169a03ffe 100644
--- a/docs/en/latest/FAQ.md
+++ b/docs/en/latest/FAQ.md
@@ -594,6 +594,36 @@ The differences between the two are described in the table 
below:
 | Used when there are property changes that needs to be propagated across all 
configuration instances of a Plugin. | Used when you need to reuse a common set 
of configuration instances so that it can be extracted to a `plugin-config` and 
bound to different Routes. |
 | Takes effect on all the entities bound to the configuration instances of the 
Plugin.                             | Takes effect on Routes bound to the 
`plugin-config`.                                                                
                                |
 
+## After deploying Apache APISIX, how to detect the survival of the APISIX 
data plane?
+
+You can create a route named `health-info` and enable the 
[fault-injection](https://apisix.apache.org/docs/apisix/plugins/fault-injection/)
 plugin (where YOUR-TOKEN is the user's token; 127.0.0.1 is the IP address of 
the control plane, which can be modified by yourself):
+
+```shell
+curl http://127.0.0.1:9180/apisix/admin/routes/health-info \
+-H 'X-API-KEY: YOUR-TOKEN' -X PUT -d '
+{
+   "plugins": {
+     "fault-injection": {
+       "abort": {
+        "http_status": 200,
+        "body": "fine"
+       }
+     }
+   },
+   "uri": "/status"
+}'
+````
+
+Verification:
+
+Access the `/status` of the Apache APISIX data plane to detect APISIX. If the 
response code is 200, it means APISIX is alive.
+
+:::note
+
+This method only detects whether the APISIX data plane is alive or not. It 
does not mean that the routing and other functions of APISIX are normal. These 
require more routing-level detection.
+
+:::
+
 ## Where can I find more answers?
 
 You can find more answers on:
diff --git a/docs/zh/latest/FAQ.md b/docs/zh/latest/FAQ.md
index 3fc6dfedd..2722d7dd7 100644
--- a/docs/zh/latest/FAQ.md
+++ b/docs/zh/latest/FAQ.md
@@ -595,6 +595,36 @@ apisix:
 | 对绑定到 Plugin 的配置实例的所有实体生效。                           | 对绑定到 `plugin-config` 
的路由生效。                                                                          
                     |
 | 对绑定到 Plugin 的配置实例的所有实体生效。                           | 对绑定到 `plugin-config` 
的路由生效。                                                                          
                     |
 
+## 部署了 Apache APISIX 之后,如何检测 APISIX 数据平面的存活情况(如何探活)?
+
+可以创建一个名为 `health-info` 的路由,并开启 
[fault-injection](https://apisix.apache.org/zh/docs/apisix/plugins/fault-injection/)
 插件(其中 YOUR-TOKEN 是用户自己的 token;127.0.0.1 是控制平面的 IP 地址,可以自行修改):
+
+```shell
+curl http://127.0.0.1:9180/apisix/admin/routes/health-info \
+-H 'X-API-KEY: YOUR-TOKEN' -X PUT -d '
+{
+  "plugins": {
+    "fault-injection": {
+      "abort": {
+       "http_status": 200,
+       "body": "fine"
+      }
+    }
+  },
+  "uri": "/status"
+}'
+```
+
+验证方式:
+
+访问 Apache APISIX 数据平面的 `/status` 来探测 APISIX,如果 response code 是 200 就代表 APISIX 
存活。
+
+:::note
+
+这个方式只是探测 APISIX 数据平面是否存活,并不代表 APISIX 的路由和其他功能是正常的,这些需要更多路由级别的探测。
+
+:::
+
 ## 如果在使用 APISIX 过程中遇到问题,我可以在哪里寻求更多帮助?
 
 - [Apache APISIX Slack Channel](/docs/general/join/#加入-slack-频道):加入后请选择 
channel-apisix 频道,即可通过此频道进行 APISIX 相关问题的提问。

Reply via email to