Problem
Synthetic tests and staging load never match the shape, volume and strangeness of real traffic. Yet exposing a rewrite or new dependency to users to find out is too risky.
Also known as: traffic-mirroring, dark-launch, request-shadowing
Copy live production requests to a new version whose responses are discarded, validating behaviour and performance with zero user impact.
Synthetic tests and staging load never match the shape, volume and strangeness of real traffic. Yet exposing a rewrite or new dependency to users to find out is too risky.
Shadow traffic, also called mirroring or dark launching, sends a duplicate of production requests to a candidate version. Users are served only by the current version, so a defective candidate costs nothing but compute.
The proxy tee's each request. The primary response goes back to the client; the mirror is fire-and-forget.
client --> proxy --> stable v1 --> response to client
|
+--(copy, async)--> candidate v2 --> discarded
|
diff + metrics store
In Envoy or Istio this is a mirror policy with a sample percentage. A comparison job normalises volatile fields, such as timestamps and generated ids, then reports mismatch rates and latency percentiles.
High - capacity for a second stack
Medium - diff pipeline and data hygiene
Medium - reasoning about isolation of side effects
Shadow writes pollute production data or send real notifications
Mirroring slows the primary path if not asynchronous
Nondeterministic fields cause noisy diffs that hide real regressions