What is a feature flag?
A feature flag controls whether a behavior is enabled for selected users or environments independently of code deployment.
How it works and where it is used
Flags can trial a new interface with a small group or disable it quickly if trouble appears. Assignment and defaults must be explicit. Every combination creates behavior to test, so too many flags increase complexity; temporary flags should not live forever.
Limits, safety and selection criteria
Do not use a client-side flag as the sole authorization check; servers must enforce access. Log changes, test rollback and consider privacy in user-targeted experiments. Remove obsolete flags and paths after a rollout succeeds. A new checkout can be enabled for employees and then a small percentage of users. Assignment should stay consistent for a person; otherwise the interface may switch during a shopping session. Monitor payment failures and support contacts, not only clicks. Test the off path as well: a new database schema may break old code even with the flag disabled. Give each flag an owner and removal date so a temporary rollout does not become permanent complexity.