API7 Docs
Traffic ManagementProxy Mirror

Proxy Mirror Configuration

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:

config.yaml
plugin_attr:
  proxy-mirror:
    timeout:
      connect: 60s
      read: 60s
      send: 60s

Then reload the gateway for changes to take effect.

Parameters

See plugin common configurations for configuration options available to all plugins.

  • hoststring · required

    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.

  • pathstring · optional

    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_modestring · optional · default: replace

    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_rationumber · optional · default: 1

    Valid values: between 0.00001 and 1 inclusive

    Ratio of the requests that will be mirrored. By default, all traffic are mirrored.