Roll out a feature flag
Plan the rollout
Write down who gets the feature first, which metric proves it works, and the number that would make you roll back.
Agree on an owner for each stage so nobody waits for a sign-off that was never assigned.
Ship behind a flag
Merge the code with the flag off. The release goes out like any other deploy, and nothing changes for customers yet.
Turn the flag on for your own team first and use the feature for a day.
Ramp up traffic
Raise exposure in steps: 1%, 10%, 50%, then everyone. Hold each step long enough to see a full day of traffic.
Pause the ramp, rather than pushing through, when a step looks worse than the one before it.
Watch the metrics
Compare error rates and latency between the flagged and unflagged groups, not against last week.
If the rollback number from your plan is crossed, turn the flag off first and investigate second.
Clean up the flag
Once everyone has had the feature for a full release cycle, delete the flag and the old code path in one change.