INFINITE UPSIDE

Technology and operations

What Does a Feature Flag Actually Turn Off?

A switch can hide a button. Whether it can undo what happened behind that button is the more expensive question.

A company releases a new checkout screen on Monday and plans to show it to a small group first. By Tuesday, support is hearing that some orders appear twice. The team flips the new feature off. The old screen returns, but the extra orders remain. The switch did exactly what it was designed to do; the assumption about what it would undo was the problem.

A feature flag is a configuration value that software checks to choose whether or how a feature runs. Depending on its design, a flag can make a capability available to a group, select between implementations, or stop a particular code path. The application still has to evaluate the flag and handle both states correctly. A flag is not, by itself, a transaction rollback, a data-repair system or a substitute for an access-control check.

The distinction between code deployment and feature release is useful. Code may be deployed before the feature is enabled for everyone. AWS AppConfig’s documentation describes one managed approach to controlling availability separately from a code deployment. It is an example of a product, not a guarantee that every flag system behaves the same way.

The switch controls a decision, not the whole application

Imagine a fictional booking site testing a redesigned cancellation flow. A flag called new_cancellation_flow determines which page a visitor sees and which cancellation handler the server calls. With the flag off, the prior flow runs. With it on, the new flow runs. The team can deploy both implementations before showing the new one to customers.

That design makes an assumption worth writing down: the old handler must still understand the data created while the new one was active. If the new handler wrote a status that the old handler cannot read, turning the flag off might reveal a second error. A team planning a rollback has to test the state after real-looking changes, not just confirm that the switch can be clicked.

A flag can also control only presentation. Hiding a button in the browser does not necessarily prevent someone from calling the underlying endpoint. If a capability requires authorization, enforce that decision where the protected operation is processed. The flag may control rollout, but the security boundary needs its own checks.

What exactly does “ten percent” mean?

A rollout plan might say: enable the feature for 10% of customers, watch the results, then increase exposure. That sounds precise until the team asks how the 10% is selected. Is it 10% of requests, accounts, devices, locations or sessions? Are employees included? Can a customer move between versions while completing one task?

Suppose a fictional service has 10,000 eligible accounts. Ten percent would be about 1,000 accounts if the system selects accounts uniformly and the eligibility list is fixed. It would not necessarily mean 1,000 active users saw the feature that day. Accounts have different activity levels, and the assigned group may not resemble the rest of the customer base. The assignment method and the unit being measured should appear in the experiment record.

Consistency can matter as much as the percentage. If the first request for an invoice sees one flow and the confirmation request sees another, a user can experience a combination neither team tested. Some systems support stable targeting by an account or user identifier; others require the application to implement that behavior. AWS documents entity-based gradual deployments for AppConfig Agent version 2.0.136060 or later, while noting that independently polling instances may briefly serve different versions during a change. Verify the product and version being used rather than assuming every rollout has the same behavior.

A small exposure group limits the number of people who can encounter a defect; it does not prove that the remaining group is safe. A payment bug triggered only by refunds may not appear until the affected workflow is exercised. Watch the actual operations, not just the total number of errors.

Decide what the off position really does

Before release, name the behavior for each state. For the cancellation example, does off mean that customers cannot start a new cancellation, that requests use the old handler, or that the service rejects all cancellation requests? Those are three different operational choices. The right answer depends on whether the old path remains valid and whether stopping the action would itself harm customers.

Next identify side effects. A flag might stop new requests from reaching a service but leave queued jobs, already-sent emails, database writes or outside-provider calls in place. If a new invoice was sent before the flag changed, turning the feature off cannot unsend it. The team may need a separate reconciliation plan, a customer-facing correction and a way to identify affected records. None follows automatically from the toggle.

Put an owner next to the off decision and record the signal that would trigger it. ‘Turn it off if things look wrong’ asks someone to decide under pressure what wrong means. A more useful plan identifies the affected operation, the metrics and support signals to watch, the person authorized to decide, and the steps needed after the flag changes. A metric can be late or incomplete, so support reports and direct checks still matter.

What happens when the flag service is unavailable?

A flag is a dependency. The application may fetch configuration remotely, keep a local copy or use a built-in default. If that lookup fails, the chosen fallback determines which behavior customers see. A default that is acceptable for a cosmetic banner could be dangerous for a payment operation or an internal-only feature.

Ask how fresh a cached value must be, how long a process can keep using it, and whether a configuration change reaches every running instance at once. A flag changed at the control panel can take time to reach the last worker if clients poll or cache values. ‘We clicked off at 2:00’ and ‘every request stopped using the new path at 2:00’ are not necessarily the same event.

The appropriate fallback is a design decision, not a universal instruction to fail open or fail closed. If turning off a risk check would expose protected data, the safe choice may be to reject the request. If disabling a noncritical recommendation would preserve a purchase, the fallback may be a simpler page. Test the chosen behavior with the dependency unavailable and the cache expired.

The cleanup nobody schedules

A temporary flag creates at least two code paths to understand, test and maintain. If the feature becomes permanent, leaving the old branch and flag forever increases the number of combinations that can exist. Six independent on-or-off flags have 64 possible combinations. A team is unlikely to test every combination casually, and some may be impossible or unsupported. The arithmetic is 2 multiplied by itself six times; it is not a prediction that all 64 combinations will appear in production.

A flag record should include its purpose, owner, creation date, allowed states, default, intended audience and expected review or removal date. Permanent operational controls can be legitimate, but they need an owner and tests just as temporary rollout flags do. Deleting a flag from a dashboard while code still expects it can make the fallback become production behavior. Remove the unused branch deliberately, verify the remaining path and then retire the configuration through the normal release process.

Flags with customer-specific targeting also require attention to privacy and logging. Record enough to explain which version was evaluated and troubleshoot a failure, but do not put secrets or unnecessary personal information into names, attributes or logs. Who can change a production flag is a separate access question from who can deploy code.

A launch checklist with a real rollback

For a consequential change, make a small map before the rollout: where the flag is evaluated, what it gates, the default when configuration is unavailable, the audience selection rule and the data or external actions each path can create. Include dependencies such as background workers and mobile clients that may not update at the same moment.

Run a rehearsal with a test record: enable the new path, perform the operation, switch it off and inspect what remains. Verify the old path can read any data the new path wrote, and establish how to identify and correct records if it cannot. If an action is irreversible or involves a third party, a rollback procedure may be a forward correction rather than a literal undo.

During release, compare results by assigned version and by the customer action that matters. A page-load metric alone can miss a broken confirmation, and aggregate error rates can conceal a failure affecting a small cohort. Record when the flag changed and which configuration version was active so investigators have a timeline.

A good flag gives a team a controlled choice. Its value comes from the design around that choice: stable targeting, tested defaults, observable outcomes and a clear plan for the things a switch cannot put back.

Explore Infinite Upside

For Vijay Sheth’s personal accounts, read Infinite Upside: Building Wealth With Room to Live, published by Sheth Capital, Inc.

Find your edition · Chapter companion

ABOUT THE CONTRIBUTOR

Luna Lim

DIRECTOR OF FINANCIAL RESEARCH & EDITORIAL STRATEGY

SHETH CAPITAL, INC.

Luna Lim writes about business, investing, and the judgment behind financial decisions. She joined PCH Exotics Inc. as Director of Operations in 2022, working across La Jolla and Miami. Today, she reports directly to Vijay Sheth at Sheth Capital, Inc., bringing an operator’s perspective to the ideas she covers.

Based in Pacific Beach, California, Luna is curious about the people behind the numbers: what they’re building, how they weigh uncertainty, and what makes a risk worth taking. Her articles for Infinite Upside follow those questions through the details, with clear explanations and a feel for how decisions play out in everyday business.

More from Luna Lim

The Infinite Upside store