A feature flag, or feature toggle, is a runtime-controlled switch that separates deployment from release. Software can be installed on production servers while the changed capability remains hidden; changing the switch later exposes the new implementation without redeploying. section 9.3.5
In its simplest form, a flag selects between old and new code with an if statement. Keep the old behavior active after deployment, validate that production still operates as before, then enable the new behavior when ready. If the change causes problems, turn the flag off to restore the old version. section 9.3.5
Feature flags support a controlled release workflow:
- Deploy artifacts independently from exposing their new capabilities to users. section 9.3.5
- Validate production behavior before enabling a changed implementation. section 9.3.5
- Roll back visible behavior by disabling the flag rather than reinstalling software. section 9.3.5
- Expose functionality gradually to selected user groups or rings. section 9.3.5
Canary exposure with a flag
Enable a new capability for a small initial group and monitor whether the application behaves as expected. If anomalies appear, disable the feature to preserve normal operations. If telemetry remains healthy and no live-site incidents occur, expose the next ring after an appropriate observation period. section 9.3.8 section 9.3.5
Flags can work alongside traffic routing. Traffic routing directs requests to a new server version, whereas a feature flag controls whether changed behavior is revealed within deployed software. Combining them supports more advanced staged-release scenarios. section 9.3.5
Figure 9.6 Ring-based deployment
Use the ring-based deployment diagram to relate progressive user exposure, monitoring, and the decision to advance or disable a feature. section 9.3.8







