SylviaBABY commented on code in PR #7667: URL: https://github.com/apache/apisix/pull/7667#discussion_r945371625
########## docs/zh/latest/plugins/proxy-mirror.md: ########## @@ -59,29 +67,60 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f1 }' ``` -测试: +### 指定 mirror 子请求的超时时间 Review Comment: ```suggestion ### 指定镜像子请求的超时时间 ``` ########## docs/zh/latest/plugins/proxy-mirror.md: ########## @@ -23,26 +28,29 @@ title: proxy-mirror ## 描述 -代理镜像插件,该插件提供了镜像客户端请求的能力。 +`proxy-mirror` 插件提供了镜像客户端请求的能力。 Review Comment: ```suggestion `proxy-mirror` 插件提供了镜像客户端请求的能力。流量镜像是将线上真实流量拷贝到镜像服务中,以便在不影响线上服务的情况下,对线上流量或请求内容进行具体的分析。 ``` ########## docs/zh/latest/plugins/proxy-mirror.md: ########## @@ -59,29 +67,60 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f1 }' ``` -测试: +### 指定 mirror 子请求的超时时间 + +我们可以在 `conf/config.yaml` 的 `plugin_attr` 中指定子请求的超时时间。这在连接复用的场景下 mirror 流量到一个非常慢的后端服务时非常有用。 + +| 名称 | 类型 | 默认值 | 描述 | +| --- | --- | --- | --- | +| connect | string | 60s | 镜像请求到上游的连接超时时间。 | +| read | string | 60s | 镜像请求到上游的读超时时间。 | +| send | string | 60s | 镜像请求到上游的写超时时间。 | Review Comment: ```suggestion | send | string | 60s | 镜像请求发送到上游的超时时间。 | ``` ########## docs/zh/latest/plugins/proxy-mirror.md: ########## @@ -59,29 +67,60 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f1 }' ``` -测试: +### 指定 mirror 子请求的超时时间 + +我们可以在 `conf/config.yaml` 的 `plugin_attr` 中指定子请求的超时时间。这在连接复用的场景下 mirror 流量到一个非常慢的后端服务时非常有用。 Review Comment: ```suggestion 我们可以在 `conf/config.yaml` 文件内的 `plugin_attr` 中指定子请求的超时时间。由于镜像请求是以子请求的方式实现,子请求的延迟将会导致原始请求阻塞,直到子请求完成,才可以恢复正常。因此可以配置超时时间,来避免子请求出现过大的延迟而影响原始请求。 ``` -- 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]
