SylviaBABY commented on code in PR #7667: URL: https://github.com/apache/apisix/pull/7667#discussion_r945387493
########## docs/en/latest/plugins/proxy-mirror.md: ########## @@ -83,26 +83,27 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f1 }' ``` -## Example usage +### Specify the timeout for mirror subrequests -Once you have configured the Plugin as shown above, the requests made will be mirrored to the configured host. +We can specify the `timeout` for subrequests in `plugin_attr` in `conf/config.yaml`. This is useful in connection reuse scenarios when mirroring traffic to a very slow backend service. -```shell -curl http://127.0.0.1:9080/hello -i -``` - -```shell -HTTP/1.1 200 OK -Content-Type: application/octet-stream -Content-Length: 12 -Connection: keep-alive -Server: APISIX web server -Date: Wed, 18 Mar 2020 13:01:11 GMT -Last-Modified: Thu, 20 Feb 2020 14:21:41 GMT +| Name | Type | Default | Description | +| --- | --- | --- | --- | +| connect | string | 60s | Connection timeout for mirror request to upstream. | +| read | string | 60s | Reading timeout for mirror request to upstream. | +| send | string | 60s | Sending timeout for mirror requests to upstream. | Review Comment: ```suggestion | send | string | 60s | The time that APISIX maintains the connection with the mirror server; if APISIX does not send a request within this time, the connection is closed. | ``` -- 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]
