guoqqqi commented on code in PR #6736:
URL: https://github.com/apache/apisix/pull/6736#discussion_r861506351
##########
docs/zh/latest/FAQ.md:
##########
@@ -257,72 +277,72 @@ Apache APISIX 的插件支持热加载。
- 9445
```
-2.重启抑或 reload APISIX
+2. 重启或者重新加载 APISIX。
-## APISIX 利用 etcd 如何实现毫秒级别的配置同步
+## APISIX 如何利用 etcd 如何实现毫秒级别的配置同步?
-etcd 提供订阅接口用于监听指定关键字、目录是否发生变更(比如:
[watch](https://github.com/api7/lua-resty-etcd/blob/master/api_v3.md#watch)、[watchdir](https://github.com/api7/lua-resty-etcd/blob/master/api_v3.md#watchdir))。
+Apache APISIX 使用 etcd 作为它的配置中心。etcd
提供以下订阅功能(比如:[watch](https://github.com/api7/lua-resty-etcd/blob/master/api_v3.md#watch)、[watchdir](https://github.com/api7/lua-resty-etcd/blob/master/api_v3.md#watchdir))。它可以监视对特定关键字或目录的更改。
APISIX 主要使用
[etcd.watchdir](https://github.com/api7/lua-resty-etcd/blob/master/api_v3.md#watchdir)
监视目录内容变更:
-* 如果监听目录没有数据更新:该调用会被阻塞,直到超时或其他错误返回。
-* 如果监听目录有数据更新:etcd 将立刻返回订阅(毫秒级)到的新数据,APISIX 将它更新到内存缓存。
+- 如果监听目录没有数据更新:则该调用会被阻塞,直到超时或其他错误返回。
-借助 etcd 增量通知毫秒级特性,APISIX 也就完成了毫秒级的配置同步。
+- 如果监听目录有数据更新:etcd 将立刻返回订阅(毫秒级)到的新数据,APISIX 将它更新到内存缓存。
-## 如何自定义 APISIX 实例 id
+## 我应该如何自定义 APISIX 实例 id?
-默认情况下,APISIX 会从 `conf/apisix.uid` 中读取实例 id。如果找不到,且没有配置 id,APISIX 会生成一个 `uuid`
作为实例 id。
+默认情况下,APISIX 从 `conf/apisix.uid` 中读取实例 id。如果找不到,且没有配置 id,APISIX 会生成一个 `uuid`
作为实例 id。
-如果你想指定一个有意义的 id 来绑定 APISIX 实例到你的内部系统,你可以在 `conf/config.yaml` 中进行配置,示例:
+要指定一个有意义的 id 来绑定 Apache APISIX 到你的内部系统,请在你的 `./conf/config.yaml` 中设置 id:
- ```
- apisix:
- id: "your-meaningful-id"
- ```
+```yaml
+apisix:
+ id: "your-id"
+```
-## 为什么 `error.log` 中会有许多诸如 "failed to fetch data from etcd, failed to read
etcd dir, etcd key: xxxxxx" 的错误?
+## 为什么 `error.log` 中会出现 "failed to fetch data from etcd, failed to read etcd
dir, etcd key: xxxxxx" 的错误?
-首先请确保 APISIX 和 etcd 之间不存在网络分区的情况。
+请按照以下步骤进行故障排除:
-如果网络的确是健康的,请检查你的 etcd 集群是否启用了 [gRPC
gateway](https://etcd.io/docs/v3.4/dev-guide/api_grpc_gateway/)
特性。然而,当你使用命令行参数或配置文件启动 etcd 时,此特性的默认启用情况又是不同的。
+1. 确保 Apache APISIX 和集群中的 etcd 部署之间没有任何网络问题。
+2. 如果网络正常,请检查是否为 etcd 启用了[gRPC
gateway](https://etcd.io/docs/v3.4.0/dev-guide/api_grpc_gateway/)。默认状态取决于你是使用命令行还是配置文件来启动
etcd 服务器。
-1. 当使用命令行参数启动 etcd,该特性默认被启用,相关选项是 `enable-grpc-gateway`。
+- 如果使用命令行选项,默认启用 gRPC 网关。可以手动启用,如下所示:
-```sh
+```shell
etcd --enable-grpc-gateway --data-dir=/path/to/data
```
-注意该选项并没有展示在 `etcd --help` 的输出中。
+**注意**:当运行 `etcd --help` 时,这个参数不会显示。
-2. 使用配置文件时,该特性默认被关闭,请明确启用 `enable-grpc-gateway` 配置项。
+- 如果使用配置文件,默认关闭 gRPC 网关。你可以手动启用,如下所示:
+
+ In `etcd.json`:
```json
-# etcd.json
{
"enable-grpc-gateway": true,
"data-dir": "/path/to/data"
}
```
+ In `etcd.conf.yml`:
Review Comment:
```suggestion
在 `etcd.conf.yml` 配置
```
##########
docs/zh/latest/FAQ.md:
##########
@@ -257,72 +277,72 @@ Apache APISIX 的插件支持热加载。
- 9445
```
-2.重启抑或 reload APISIX
+2. 重启或者重新加载 APISIX。
-## APISIX 利用 etcd 如何实现毫秒级别的配置同步
+## APISIX 如何利用 etcd 如何实现毫秒级别的配置同步?
-etcd 提供订阅接口用于监听指定关键字、目录是否发生变更(比如:
[watch](https://github.com/api7/lua-resty-etcd/blob/master/api_v3.md#watch)、[watchdir](https://github.com/api7/lua-resty-etcd/blob/master/api_v3.md#watchdir))。
+Apache APISIX 使用 etcd 作为它的配置中心。etcd
提供以下订阅功能(比如:[watch](https://github.com/api7/lua-resty-etcd/blob/master/api_v3.md#watch)、[watchdir](https://github.com/api7/lua-resty-etcd/blob/master/api_v3.md#watchdir))。它可以监视对特定关键字或目录的更改。
APISIX 主要使用
[etcd.watchdir](https://github.com/api7/lua-resty-etcd/blob/master/api_v3.md#watchdir)
监视目录内容变更:
-* 如果监听目录没有数据更新:该调用会被阻塞,直到超时或其他错误返回。
-* 如果监听目录有数据更新:etcd 将立刻返回订阅(毫秒级)到的新数据,APISIX 将它更新到内存缓存。
+- 如果监听目录没有数据更新:则该调用会被阻塞,直到超时或其他错误返回。
-借助 etcd 增量通知毫秒级特性,APISIX 也就完成了毫秒级的配置同步。
+- 如果监听目录有数据更新:etcd 将立刻返回订阅(毫秒级)到的新数据,APISIX 将它更新到内存缓存。
-## 如何自定义 APISIX 实例 id
+## 我应该如何自定义 APISIX 实例 id?
-默认情况下,APISIX 会从 `conf/apisix.uid` 中读取实例 id。如果找不到,且没有配置 id,APISIX 会生成一个 `uuid`
作为实例 id。
+默认情况下,APISIX 从 `conf/apisix.uid` 中读取实例 id。如果找不到,且没有配置 id,APISIX 会生成一个 `uuid`
作为实例 id。
-如果你想指定一个有意义的 id 来绑定 APISIX 实例到你的内部系统,你可以在 `conf/config.yaml` 中进行配置,示例:
+要指定一个有意义的 id 来绑定 Apache APISIX 到你的内部系统,请在你的 `./conf/config.yaml` 中设置 id:
- ```
- apisix:
- id: "your-meaningful-id"
- ```
+```yaml
+apisix:
+ id: "your-id"
+```
-## 为什么 `error.log` 中会有许多诸如 "failed to fetch data from etcd, failed to read
etcd dir, etcd key: xxxxxx" 的错误?
+## 为什么 `error.log` 中会出现 "failed to fetch data from etcd, failed to read etcd
dir, etcd key: xxxxxx" 的错误?
-首先请确保 APISIX 和 etcd 之间不存在网络分区的情况。
+请按照以下步骤进行故障排除:
-如果网络的确是健康的,请检查你的 etcd 集群是否启用了 [gRPC
gateway](https://etcd.io/docs/v3.4/dev-guide/api_grpc_gateway/)
特性。然而,当你使用命令行参数或配置文件启动 etcd 时,此特性的默认启用情况又是不同的。
+1. 确保 Apache APISIX 和集群中的 etcd 部署之间没有任何网络问题。
+2. 如果网络正常,请检查是否为 etcd 启用了[gRPC
gateway](https://etcd.io/docs/v3.4.0/dev-guide/api_grpc_gateway/)。默认状态取决于你是使用命令行还是配置文件来启动
etcd 服务器。
-1. 当使用命令行参数启动 etcd,该特性默认被启用,相关选项是 `enable-grpc-gateway`。
+- 如果使用命令行选项,默认启用 gRPC 网关。可以手动启用,如下所示:
-```sh
+```shell
etcd --enable-grpc-gateway --data-dir=/path/to/data
```
-注意该选项并没有展示在 `etcd --help` 的输出中。
+**注意**:当运行 `etcd --help` 时,这个参数不会显示。
-2. 使用配置文件时,该特性默认被关闭,请明确启用 `enable-grpc-gateway` 配置项。
+- 如果使用配置文件,默认关闭 gRPC 网关。你可以手动启用,如下所示:
+
+ In `etcd.json`:
Review Comment:
```suggestion
在 `etcd.json` 配置:
```
--
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]