Skip to content

Commit

Permalink
docs(FAQ): add how to detect APISIX alive status (apache#7812)
Browse files Browse the repository at this point in the history
Co-authored-by: soulbird <[email protected]>
  • Loading branch information
2 people authored and Liu-Junlin committed Nov 4, 2022
1 parent cb7efa2 commit de19091
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
30 changes: 30 additions & 0 deletions docs/en/latest/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
30 changes: 30 additions & 0 deletions docs/zh/latest/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 相关问题的提问。
Expand Down

0 comments on commit de19091

Please sign in to comment.