Testing and reliability / Advanced / 5 min / Updated
Testing in production: feature flags, dark launch, shadow traffic
Ship a version with a hidden bug four ways. Count users hurt with a big-bang release, a feature flag, a dark launch and mirrored shadow traffic.
Start the simulation → Change the load, break a part, watch what happens. Free, no sign-up.
In short
What is testing in production?
Check a new version with real traffic safely: feature flags, dark launches and mirrored shadow traffic.
Why does it matter?
Some bugs only appear with real users, data and load that no test environment has.
What is the trade-off?
Flags expose a few users; shadows expose none but double load and must stub every side effect.
How do you explain it in an interview?
"Ship dark, shadow-compare responses, then a flag at 1%, 10%, 100% with a kill switch and error-rate alerts."
Check yourself
What does shadow traffic (mirroring) do?
Answer: Copies real requests to the new version, compares answers and throws them away. Real inputs, no user impact, but double the load.
What must a shadow copy never do?
Answer: Cause side effects such as sending emails or charging cards. Writes in the shadow path must go to fakes.
Why put a new feature behind a flag?
Answer: You can turn it on for a few users and switch it off in seconds without a deploy. The flag is the kill switch and the gradual rollout.