New feature: Shadow Traffic

I’ve been thinking about building a small Go proxy for shadowing traffic to a second upstream.

I’m curious if any of the Caddy developers have thought deeply about this or if there are any plans to implement something similar?

At a high level, I’d like to be able to specify a second host (or set of hosts) to be able to send a % of traffic to in which the response does not get proxied back to the client, but instead gets recorded (metrics) and discarded.

After briefly peeking at the code, I think it could involve some significant changes to the core proxy logic.

WDYT?

I think this is a good case for a Caddy plugin, rather than a core feature. :slight_smile: It can certainly be done as a plugin; Go makes it fairly easy to write proxies.

Might make a good extension to the existing proxy directive (as a subdirective that configures the proxy not to wait for or return the upstream response to the client but continue down the middleware chain as normal).

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.