How to Set Up Traffic Shadowing

Learn how to duplicate real traffic to a secure overlay environment for behavioral testing.

How to Set Up Traffic Shadowing

MicroStax's Traffic Shadowing (Patent 09) allows you to duplicate incoming traffic from a base environment into a sparse overlay. This lets you test behavioral drift using real-world data without impacting the primary application.

1. Create a Baselined Environment

First, you need a stable environment running as the baseline.

microstax env create --name production-clone --blueprint ./prod.yaml
microstax env baseline promote production-clone

2. Spin Up an Overlay

Next, create an overlay Environment that sits on top of your baseline. This overlay only needs to run the service you are changing.

microstax env overlay create --base production-clone --name shadow-test --blueprint ./patch.yaml

3. Enable Shadowing via CLI

You can easily enable the shadow multiplexer (Tee-Proxy) on the CLI:

microstax env shadow enable shadow-test

4. Monitor the Behavioral Diff

Send some requests to production-clone. The traffic will automatically be copied and forwarded to shadow-test.

To view the behavioral discrepancies between the base service and your new service, navigate to the Dashboard > Predictive Panel or use the CLI:

microstax env diffs get shadow-test

Any discrepancies in payload shape, latency, or HTTP status codes will be reported immediately.

How to Set Up Traffic Shadowing | MicroStax Documentation