A dark launch is the practice of deploying new functionality to production while keeping it invisible or inactive for end users, so that the team can observe how the code behaves under real traffic and real data before anyone depends on it. In software distribution it separates two events that are often treated as one: deployment, which puts code on servers or devices, and release, which exposes the feature to people.
The technique is most common in online services, where a backend change can be exercised silently by production requests. It also appears in client applications, which may ship code that stays dormant until a remote switch activates it.
How a dark launch separates deployment from release
A dark launch works by placing new code paths behind a control point that users cannot see, typically a feature flag, a configuration switch or a routing rule. The new code runs in production, but its output is either discarded, logged for comparison, or shown only to internal accounts.
Three mechanisms are used in practice, often in combination. The table below summarizes them.
| Mechanism | How it works | What it reveals |
|---|---|---|
| Feature flag off | Code ships but the flag keeps it inactive | Build, packaging and startup safety |
| Shadow traffic | Production requests are copied to the new path, results discarded | Load, latency and error rates |
| Internal exposure | Only employees or test accounts see the feature | Functional behavior with real data |
| Dual execution | Old and new code both run, outputs are compared | Correctness differences |
The value of this separation is risk reduction without user impact. Problems such as memory leaks, slow database queries or unexpected dependencies surface while the blast radius is close to zero, because no visible user journey relies on the new path yet.
Shadow traffic and comparison testing
Shadow traffic, also called traffic mirroring, is the most powerful form of a dark launch because it exposes new code to the real distribution of requests, including rare edge cases that synthetic load tests rarely reproduce. A proxy, a service mesh or application code duplicates each incoming request and sends the copy to the new component asynchronously.
Teams then compare the two outputs. A diffing step records mismatches between the old and the new result, and engineers investigate them before any switch-over. This approach is widely used for database migrations, search ranking changes and rewritten services, where correctness must be proven at scale.
Shadowing must be designed carefully. The shadow path must never produce side effects: it must not send emails, charge cards, write to the primary database or call external partners. It also adds real infrastructure load, often doubling the cost of the mirrored component for the duration of the test.
Dark launch compared with related release techniques
A dark launch belongs to a family of progressive delivery practices, and each answers a different question about a change. The comparison below places it next to the closest neighbors.
| Technique | Who sees the change | Main question answered |
|---|---|---|
| Dark launch | Nobody, or internal staff only | Does it work under real production load |
| Canary release | A small share of real users | Does it harm real users at small scale |
| Staged rollout | Growing percentages over days | Is it safe to expand to everyone |
| A/B test | Randomized user groups | Which variant performs better |
| Blue-green deployment | All users, switched at once | Can traffic move instantly and back |
In a typical pipeline these techniques follow each other: a feature is dark launched first, then exposed to a canary group, and finally completed through a staged rollout. A dark launch also makes software rollback cheaper, because disabling a flag is usually faster and safer than redeploying a previous build.
Planning and running a dark launch
A successful dark launch starts with explicit success criteria defined before the code ships. Without thresholds for latency, error rate and resource use, the team cannot decide objectively whether the feature is ready for release.
| Signal | Example threshold | Why it matters |
|---|---|---|
| Latency | p99 within 10 percent of baseline | Detects slow queries and contention |
| Error rate | No increase above normal noise | Reveals exceptions and timeouts |
| Resource use | CPU and memory within capacity plan | Prevents saturation at full release |
| Output mismatch | Below an agreed share of compared requests | Confirms functional correctness |
- Wrap the new path in a kill switch that can be turned off in seconds.
- Ramp shadow traffic gradually, for example 1, 10 and 100 percent of requests.
- Tag logs and metrics so dark traffic can be separated from user traffic.
- Set an end date and remove the flag after full release.
In client software the same principle applies with different tools. A mobile or desktop update can contain dormant code controlled by a remote configuration service, which lets the vendor activate the feature for internal testers long after the binary passed store review.
Risks and limitations of dark launching
A dark launch reduces risk but does not remove it, and it introduces its own operational and security costs. The most frequent failure is an unintended side effect from a shadow path that was assumed to be read-only.
| Problem | Consequence | Remedy |
|---|---|---|
| Shadow path writes data | Duplicate records or messages | Stub all external writes |
| Dormant code is discovered | Feature leaks before announcement | Avoid shipping sensitive strings in clients |
| Flags are never removed | Growing technical debt | Track flags with owners and expiry dates |
| Extra load is ignored | Production slowdown during testing | Budget capacity and ramp gradually |
There is also a limit to what a dark launch can prove. Hidden code reveals performance and correctness, but it cannot show how real users react to a design or whether they find the feature useful. That question requires visible exposure, through a canary group or an A/B test.
A non-technical view
A dark launch is like a restaurant cooking a new dish in the real kitchen during a busy evening, but serving it only to the staff. The cooks learn whether the recipe works with real ingredients and real pressure, while guests still receive the usual menu.
If the new dish causes trouble, nobody outside the kitchen notices. The main benefit is testing for real without risking customers, so the eventual public launch is calmer and far less likely to fail.
A concrete example
An online retailer plans to replace its product search engine. Instead of switching directly, the engineering team deploys the new engine alongside the old one and mirrors every search request to it for two weeks. Customers still receive results only from the old engine.
Monitoring shows that the new engine handles normal traffic well but its p99 latency triples during an evening sale peak, caused by an unindexed filter on brand names. The team fixes the index and repeats the mirror test, and the comparison step shows that 98 percent of top results match or improve on the old ranking.
Only then does the retailer expose the new engine to 5 percent of shoppers as a canary. The full rollout completes a week later with no customer-facing incident, because the most serious problem had already been found in the dark.