Skip to content

Commit

Permalink
docs: update proxy-mirror
Browse files Browse the repository at this point in the history
  • Loading branch information
Gallardot committed Nov 11, 2022
1 parent e2db608 commit eb4aa6a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/en/latest/plugins/proxy-mirror.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ The response returned by the mirror request is ignored.
|--------------|--------|----------|---------|--------------|---------------------------------------------------------------------------------------------------------------------------|
| host | string | True | | | Address of the mirror service. It needs to contain the scheme but without the path. For example, `http://127.0.0.1:9797`. |
| path | string | False | | | Path of the mirror request. If unspecified, current path will be used. |
| path_concat_mode | string | False | replace | ["replace", "prefix"] | If the path of a mirror request is specified, set the concatenation mode of request paths. The `replace` mode will directly use `path` as the path of the mirror request. The `prefix` mode will use the `path` + `source request URI` as the path to the mirror request. |
| sample_ratio | number | False | 1 | [0.00001, 1] | Ratio of the requests that will be mirrored. |

You can customize the proxy timeouts for the mirrored sub-requests by configuring the `plugin_attr` key in your configuration file (`conf/config.yaml`). This can be used for mirroring traffic to a slow backend.
Expand Down
1 change: 1 addition & 0 deletions docs/zh/latest/plugins/proxy-mirror.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ description: 本文介绍了 Apache APISIX proxy-mirror 插件的相关操作,
| ---- | ------ | ------ | ------ | ------ | ------------------------------------------------------------------------------------------------------- |
| host | string || | | 指定镜像服务的地址,地址中需要包含 `schema``http``https`),但不能包含 `path` 部分。例如 `http://127.0.0.1:9797`|
| path | string || | | 指定镜像请求的路径。如果不指定,则默认会使用当前路径。 |
| path_concat_mode | string || replace | ["replace", "prefix"] | 当指定镜像请求的路径时,设置请求路径的拼接模式。`replace`将会直接使用path作为镜像请求的路径。`prefix`将会使用`path`+ `来源请求URI`作为镜像请求的路径。 |
| sample_ratio | number || 1 | [0.00001, 1] | 镜像请求的采样率。当设置为 `1` 时为全采样。 |

## 启用插件
Expand Down

0 comments on commit eb4aa6a

Please sign in to comment.