QA
Senior LevelSystem Design & Architecture

How does Traffic Shadowing (Dark Traffic Mirroring) test new service versions in production?

❓ Interview Prompt: Explain Traffic Shadowing (Traffic Mirroring), dark launching, NGINX / Envoy request duplication, and zero-risk production testing.

Traffic Shadowing (Dark Traffic Mirroring) duplicates live production HTTP requests at the API Gateway layer and sends asynchronous copies to a new candidate microservice version:

Benefits:

β€’
Test new service versions against real production traffic volume, edge cases, and payload patterns.
β€’
Zero Risk: Shadow responses are discarded at the gateway layer and never returned to real users!

Code Implementation Example

yaml
# Envoy Route Configuration for Traffic Shadowing (Mirroring)
routes:
- match: { prefix: "/api/v1/orders" }
  route:
    cluster: order-service-v1 # Live Production Target
    request_mirror_policies:
    - cluster: order-service-v2-shadow # Shadow Target (Responses discarded!)
      percentage: { numerator: 100 }
πŸ’‘Envoy configuration duplicating production traffic for dark testing.
🎯 Interview Key Takeaway

Use Traffic Shadowing to test new microservice versions against live production traffic without impacting real users.

#System Design#Traffic Shadowing#Dark Launching#Envoy#Senior
Back to all System Design & Architecture Questions→

More System Design & Architecture Interview Questions

Beginner LevelSystem Design & Architecture

Explain the CAP Theorem and PACELC Theorem with real-world database examples.

Beginner LevelSystem Design & Architecture

What is Vertical Scaling (Scale Up) vs Horizontal Scaling (Scale Out)?

Beginner LevelSystem Design & Architecture

How do Load Balancers distribute traffic (Round Robin, Least Connections, IP Hash)?