Before enabling a feature flag, decide when to stop the rollout
A feature flag lets a team decide who sees a change after the code has shipped. For a small team, the difficult decision often arrives after the flag is on. A dashboard shows some failed requests, a support ticket mentions a delay, and someone has to decide whether to expose the change to more customers. Write that decision rule while the site is healthy and the team has time to agree on it.
Measure what the customer is trying to do
A phased rollout starts with a limited group. Google's Site Reliability Workbook chapter on canarying releases describes evaluating a group that receives the change against a control and choosing signals that reflect user-visible problems. For a new invoice download, track whether an eligible download attempt returns the correct file within a useful time. Record the number of eligible attempts alongside the number of failures. A green server dashboard gives limited assurance if the download itself is failing.
Choose a comparison that makes sense for the workflow. If only one group uses older invoice formats, a difference between the groups could have more than one cause. Check the same file types and give the feature enough time to see the traffic or tasks it has to handle. An idle pilot gives little evidence about how the rollout behaves under use.
Write a rule someone can apply under pressure
Imagine a business introducing a new invoice downloader. Its rollout owner puts this plan in the release ticket before switching on the flag for the first customer group.
- Observe. Count eligible attempts, slow downloads and failed downloads for the pilot and the group still using the existing downloader. Include both current and older invoice formats. Define what counts as slow or failed and set a stop threshold for each rate, taking account of how the existing downloader normally performs. Decide how many real attempts and which usage periods you need before expanding.
- Pause. Keep the rollout at its current size if the comparison is inconclusive, the metrics stop arriving or the group has yet to try the older formats. Agree who checks the missing evidence and when the decision will be revisited.
- Advance. Widen only after the observation requirements are met, both download paths are healthy, and the pilot’s slow and failed download rates are below their agreed stop thresholds.
- Stop and recover. Stop expanding if the pilot reaches either stop threshold or a pilot user repeatedly cannot retrieve an invoice that the existing downloader serves correctly. Follow the agreed recovery action and verify the affected path. Give one person authority to act and name who covers them.
These are example decision rules. Each team can set its thresholds and observation window from the normal failure rate, traffic volume and likely customer impact. Microsoft’s guidance on safe deployment practices likewise places health checks between rollout phases and calls for pausing and beginning recovery when a deployment causes an issue.
Check what turning the flag off will restore
In the downloader example, the flag might restore the previous download path. Confirm that the older path can still serve documents handled during the pilot. Some changes also write new data or start background jobs. If turning off a flag leaves those changes in place, identify the recovery owner and the steps for that state before enabling the flag for the first group. Microsoft's deployment guidance calls out the separate difficulty of reversing database and other stateful changes.
After applying recovery, test the customer action that failed and make sure any pending work is accounted for. If customers need an update, explain the impact, the evidence of recovery and any remaining work. The incident status update guide gives examples of how to communicate those changes.