Module shadow

Module shadow 

Source
Expand description

Traffic mirroring / shadowing for safe canary testing

This module implements fire-and-forget request duplication to shadow upstreams, enabling safe canary deployments and testing with production traffic.

§Features

  • Sampling-based mirroring (percentage control)
  • Header-based sampling (selective mirroring)
  • Optional request body buffering
  • Fire-and-forget async execution (no blocking)
  • Comprehensive metrics

Structs§

ShadowManager
Manager for traffic shadowing/mirroring

Functions§

buffer_request_body
Buffer request body from session with size limits
clone_body_for_shadow
Clone request body bytes for shadow traffic
should_buffer_method
Helper to determine if HTTP method should have body buffered