Course contentsShow
← Software Engineering
Lesson 713 of 1,93322. Continuous Delivery and DeploymentFree lesson

Shadow Deployment

Route production traffic to new versions without affecting users, comparing behavior against the current version.

Shadow Deployment

What you'll learn: How to test new software versions in production by routing real traffic to them in parallel, without affecting users.


What Is Shadow Deployment?

Shadow deployment (also called dark launching or shadow testing) means running a new version of your software alongside the current production version, feeding it real user traffic, but discarding its responses. Users continue receiving responses only from the stable version.

You're essentially creating a "shadow" system that processes live requests invisibly, allowing you to observe how the new version behaves under real-world conditions without any user impact.

How It Works

When a request arrives:

  1. The production version handles it normally and returns the response to the user
  2. The same request is also sent to the shadow version
  3. The shadow version processes it fully but its response is thrown away
  4. You compare logs, metrics, performance, and behavior between both versions

This differs from canary releases (where some users get the new version) or blue-green deployment (where you switch all traffic at once). In shadow deployment, no users interact with the new version's output.

When to Use Shadow Deployment

Shadow deployment shines when you need confidence about:

  • Performance characteristics under real load
  • Unexpected error conditions with actual data patterns
  • Resource consumption (CPU, memory, database queries)
  • Compatibility with production data that's hard to replicate in testing

The trade-off: you're running double infrastructure and processing requests twice, which increases cost and complexity.

Key Takeaway: Shadow deployment tests new versions with production traffic while keeping users completely isolated from any potential issues, providing real-world validation without risk.