Proxy Mirror Configuration
Configuration reference for the Proxy Mirror plugin (`proxy-mirror`): the static configurations and parameters, each attribute with its type, whether it is required, its default and its accepted values.
Static Configurations
By default, timeout values for the plugin are pre-configured in the default configuration.
The file to update depends on how the gateway is deployed:
For host or Docker deployments, configure the following settings:
plugin_attr:
proxy-mirror:
timeout:
connect: 60s
read: 60s
send: 60sThen reload the gateway for changes to take effect.
For Helm deployments, update the chart values that render plugin_attr.proxy-mirror. Keep the rest of your values file unchanged.
For the APISIX Helm chart, set the following values:
apisix:
pluginAttrs:
proxy-mirror:
timeout:
connect: 60s
read: 60s
send: 60sFor the API7 Gateway Helm chart, set the following values:
pluginAttrs:
proxy-mirror:
timeout:
connect: 60s
read: 60s
send: 60sThen apply the values file with the chart used for this gateway release:
helm upgrade <release-name> <chart-name> -n <namespace> -f values.yamlParameters
See plugin common configurations (opens in Apache APISIX docs) for configuration options available to all plugins.
host — string · required · since APISIX 1.2 · API7 Gateway 3.7.0
Address of the host to forward the mirrored traffic to. The address should contain the scheme but without the path, such as http://127.0.0.1:8081.
path — string · optional · since APISIX 2.13.0 · API7 Gateway 3.7.0
Request path to use for mirrored HTTP traffic. If unspecified, the current route URI path is used. For native gRPC and grpc-web traffic, this field is ignored and the gateway preserves the effective gRPC method path after access-phase rewrites.
path_concat_mode — string · optional · default: replace · since APISIX 3.1.0 · API7 Gateway 3.7.0
Valid values: replace or prefix
Concatenation mode when path is specified. When set to replace, the configured path replaces the request path. When set to prefix, the request path is appended to the configured path. For native gRPC and grpc-web traffic, this field is ignored and the gateway preserves the effective gRPC method path.
sample_ratio — number · optional · default: 1 · since APISIX 2.10.0 · API7 Gateway 3.7.0
Valid values: between 0.00001 and 1 inclusive
Ratio of the requests that will be mirrored. By default, all traffic are mirrored.