Every team has shipped something that looked fine in testing and misbehaved in production. When that happens, the fastest fix is often to switch the feature off, not to roll back and redeploy.
Set it up before you need it
- Put every risky feature behind a flag from the start.
- Make the off value the safe, known-good behaviour, and use it as the default in code.
- Use
streamingmode so changes reach your services as they happen, rather than at the next poll. - Agree who is allowed to flip it. Members can toggle flags; viewers cannot.
When it goes wrong
- Switch the flag offToggle it in the affected environment, usually Production.
- ConfirmCheck that errors fall and the old behaviour is back.
- Look at the audit logSee what changed and when, so you know what to fix.
- Fix, then try againTest in Development and Staging, and restart the rollout from a small percentage.
A gentler option
If the problem is only affecting some users, lower the rollout percentage instead of turning the flag off, or add a rule that excludes the affected group.
Learn how environments and flags fit together in core concepts.
