Customize the Host header in shadow mirrored request

428 views
Skip to first unread message

Mark Vincze

unread,
Feb 21, 2019, 4:43:34 PM2/21/19
to envoy-users
Hi all,

I'm doing shadow mirroring by using the request_mirror_policy. My config (simplified) looks like this:
static_resources:
  listeners:
  - name: listener_0
    filter_chains:
    - filters:
      - name: envoy.http_connection_manager
        config:
          stat_prefix: ingress_http
          route_config:
            name: local_route
            virtual_hosts:
            - name: main-host
              domains: ["*"]
              routes:
              - match:
                  prefix: "/"
                  query_parameters: [ { name: "somequeryarg", value: "value", regex: true } ]
                route:
                  host_rewrite: main-cluster.example.com
                  cluster: main-cluster
                  request_mirror_policy:
                    cluster: mirror-cluster
                    runtime_fraction: { default_value: { numerator: 10 } }

  clusters:
  - name: main-cluster
    type: STRICT_DNS
    hosts: [{ socket_address: { address: main-cluster.example.com, port_value: 80 }}]

  - name: mirror-cluster
    type: STRICT_DNS
    hosts: [{ socket_address: { address: mirror-cluster.example.com, port_value: 80 }}]

So I'm mirroring 10% of the traffic to mirror-cluster.

If I understand the docs correctly, when Envoy sends the mirrored requests, it appends -shadow to Host header.
Is there any way to customize this, and specify a different Host header for the mirrored requests?

Thanks!
Mark Vincze

Harvey Tuch

unread,
Feb 21, 2019, 5:04:06 PM2/21/19
to Mark Vincze, envoy-users
Not today, this would make sense to file as a feature request at https://github.com/envoyproxy/envoy/issues.

--
You received this message because you are subscribed to the Google Groups "envoy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to envoy-users...@googlegroups.com.
To post to this group, send email to envoy...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/envoy-users/CADXhE3KXEu2-2BQYTmiMpX65qetB4dzSTn1c%3Df4v%2BQsPqje9XA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Mohamed Aboessa

unread,
Dec 24, 2025, 5:22:19 AM (5 days ago) Dec 24
to envoy-users
I know this is pretty old, but they added a similar feature here https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/http/ext_proc/v3/ext_proc.proto using. `host_rewrite_literal`
Reply all
Reply to author
Forward
0 new messages