Overview
In a shadow deployment, incoming requests are sent to both the current production version and the new 'shadow' version. The response from the shadow version is ignored or logged for analysis, while the production version's response is sent to the user.
Key Concepts
- Traffic Mirroring: Duplicating incoming requests at the load balancer or service mesh level.
- Comparison Logic: Tools that compare the outputs of the production and shadow versions to detect discrepancies.
- No Side Effects: Ensuring the shadow version does not perform actions like sending emails or updating databases (often achieved through mocking).
Benefits
- Zero User Impact: Test new code with real traffic without any risk to users.
- High Fidelity Testing: Catch edge cases that only appear with real-world data.
- Performance Benchmarking: Compare the latency and resource usage of the new version against the old.