DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk5 min

How Feature Flags Work: Targeting, Rollouts, and Kill Switches Explained

Feature flags control which code path runs at runtime. Learn how targeting, stable rollout cohorts, variants, kill switches, privacy, and cleanup fit together.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Feature flags let an application decide at runtime whether a capability is available, and to whom. They separate deploying code from exposing it: code can be present in production while a flag keeps its new behavior off, limits it to a cohort, or routes requests to an alternate path. The decision is only as dependable as its evaluation context, fallback, configuration delivery, monitoring, and operational ownership.

How a feature flag works

In application code, a flag client evaluates a key such as new-checkout against a context describing the current subject, then returns a value such as enabled, disabled, or a named variant. The application follows the corresponding branch:

if (flags.isEnabled("new-checkout", context)) {
  return newCheckout(request);
}
return existingCheckout(request);

This is a conceptual example, not a universal API. Depending on the flag system, evaluation may happen in the application, a service, or another component; configuration delivery, caching, offline behavior, defaults, and propagation delays also vary. A flag does not itself deploy code, make a broken path safe, or guarantee that a changed setting reaches every evaluator immediately.

OpenFeature calls the subject identifier in evaluation context a targeting key. It can be a unique user ID, a hash of an attribute, or a service or application hostname. Many systems use it to assign subjects consistently in percentage-based rollouts, and some providers may require it. See OpenFeature’s evaluation context documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How targeting rules decide who qualifies

Targeting answers which subjects are eligible for a feature. A team might target a subscription plan, region, user identifier, or service, provided the flag system supports that field and the application supplies it in context. Available attributes and comparison operators depend on the implementation.

Unleash documents one example of rule composition: a flag can have multiple activation strategies, and at least one matching strategy enables it (OR logic). Within a strategy, every configured constraint must match (AND logic). Constraints can use standard or custom context fields. This is Unleash’s model, not a universal rule for all flag systems. The details are in Unleash’s activation strategies documentation.

How percentage rollouts and stickiness work

A percentage rollout limits exposure to a share of eligible subjects. It need not draw a fresh random number on each request. With a stable targeting key and a consistent assignment method, the system can place a subject in a cohort and keep that assignment across evaluations.

In Unleash’s documented model, rollout assignment uses a normalized MurmurHash of a unique ID. Its stickiness setting and strategy group ID affect the assignment. Raising the percentage keeps already included subjects and adds others; lowering it removes subjects above the new threshold. Restoring an earlier percentage can restore the earlier cohort if the group ID and context remain unchanged. These implementation details are specific to Unleash; its stickiness documentation was last updated August 25, 2026.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use an identifier whose stability matches the experience you want:

  • User ID: can preserve assignment across sessions when it is available and passed consistently.
  • Session ID: can provide consistency for one anonymous session, but a later session may be assigned differently.
  • No stable identifier: Unleash says its default behavior may assign randomly if neither userId nor sessionId is available, so stickiness is not guaranteed.

For migrations that evaluate a flag at several decision points, the migration guide recommends a stable user ID where available and consistent evaluation context. Otherwise, different parts of a request could make decisions using different subjects or assignments. See Unleash’s migration guide.

How variants differ from a rollout

A basic flag chooses enabled or disabled. A variant-capable evaluation can instead return one of several alternatives. In Unleash’s A/B testing guide, a variant has a name, a weight, and optionally a payload. The rollout percentage defines the eligible population; variant weights divide that population among alternatives. Teams can measure outcomes and decide whether to make a winning variant generally available.

Assignment mechanics are not a complete experimental design. A flag system’s ability to split traffic does not establish that a test has enough participants, that a result is statistically significant, or that the observed difference was caused by the variant. For the documented mechanics, see Unleash’s A/B testing guide.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When a flag can act as a kill switch

A kill switch is an operational flag used to disable a capability or redirect traffic when a problem appears. For example, an application can use a flag to choose between a new service path and a legacy path. If the new path degrades, changing the flag can route traffic back without redeploying the code that makes the choice. Unleash’s migration guide describes this pattern.

That rollback works only if the fallback path still exists, has been tested, and can handle the returning traffic. The flag evaluation must also be placed where it can control the relevant behavior, and the configuration change must reach it. A flag can reverse routing; it cannot undo irreversible data changes. Unleash advises verifying before final legacy-data removal because a flag cannot restore data that has been deleted.

Plan the operational response before exposure increases:

  • Choose the metrics that indicate the new path is unhealthy and set a threshold or decision rule in advance.
  • Confirm who can pause or disable the rollout and how the change is propagated.
  • Test the fallback under realistic conditions rather than assuming that the old path remains viable.
  • Keep monitoring after changing the flag so the team can confirm the response worked.

Unleash documents safeguards that monitor Prometheus-compatible metrics and may pause a rollout or disable an environment after a threshold is crossed. This is a product capability, not a feature guaranteed by every flag system. Configuration propagation and recovery time also depend on the specific implementation.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
Game Programming Patterns
  • Brand New in box. The product ships with all relevant accessories
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Context, privacy, and flag lifecycle

Evaluation context is useful for targeting, but it can contain personal data. Pass only fields needed for the decision, consider pseudonymous stable identifiers, and understand whether the provider handles or persists context. OpenFeature notes that hooks can help restrict, filter, or anonymize context data; see its evaluation context guidance.

Flags also create code and operational work. Temporary rollout or experiment flags should have an owner and a cleanup plan: remove obsolete branches and settings when they are no longer needed. Unleash’s A/B testing guide directs teams to archive a flag and clean up code after the winning variant reaches all users. Leaving old flags indefinitely makes it harder to understand which paths remain active and increases the burden of maintaining them.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.