Feature Flag.
A feature flag is a switch in the code that turns a feature on or off without shipping the software again. A new feature can first be released only to your own team, then to a share of users and only afterwards to everyone, and if problems appear it is switched off again with one click.
Feature Flag — Explained in Detail
A feature flag (also called a feature toggle) separates two things that coincide in traditional software development: shipping code and switching on a feature. The new code is already on the server, but a simple check decides whether it runs. The value of that switch lives outside the code, for example in a configuration file, an environment variable, a database table or a dedicated service. Flipping it changes the application's behaviour immediately, without a new build and without a new deployment.
There are roughly four kinds. Release flags hide unfinished features so the team can keep working on the main branch of version control instead of maintaining separate branches for weeks. Experiment flags split users into groups and are the technical basis for A/B testing. Ops flags are kill switches that turn off a resource-heavy or fragile feature under load. Permission flags enable features only for certain customers, plans or roles, such as an export that is only included in the larger subscription.
The biggest practical benefit is gradual release. A new feature first runs only for internal accounts, then for five per cent of users, then for everyone. If errors show up, nobody rushes a rollback; the switch is simply flipped. That lowers the risk of every release and allows shipping more often in smaller steps. Combined with a staging environment, the result is a calm process: test on staging, ship to production behind the flag, release in a controlled way.
Feature flags have a downside: every switch doubles the paths the code can take. If old flags are not removed after full release, the number of possible combinations grows, tests become confusing and nobody knows which switch still does anything. That is a typical form of technical debt. Good practice is therefore to give every release flag an expiry date and an owner when it is created. How we build web apps with a clean release process is described on the page web app development.
Build feature flags yourself or use a service?
For a small product a plain solution is often enough: a table of switches in your own database and a small admin screen to flip them. That is quick to build, costs nothing to run and stays fully under your control. Once you need percentage rollouts, audiences based on attributes, analytics and a change log, a dedicated service or a self-hosted open-source solution becomes worthwhile.
With third-party services, check which user data is transmitted for the targeting rules and where it is processed. For Swiss companies that is a question under the Data Protection Act. The decision follows the same logic as any make-or-buy question: how central is the function, and how much dependency is acceptable?
Example: new online booking for a hair salon
An example: a hair salon with three branches has its booking app extended with a card deposit. Instead of switching the feature on for all customers one Monday morning, it is placed behind a feature flag. In the first week only staff see it and make test bookings themselves. In the second week it is activated for a single branch so the team learns how to handle questions.
If this phase shows that the confirmation email renders incorrectly in certain mail clients, the deposit is switched off again for that branch, the bug is fixed and the rollout restarts. Only when everything runs smoothly does the feature apply to all three branches, and the flag is removed from the code. We plan such processes from the outset in custom software and in web development in Zurich.
Related Page
Technical DebtFrequently Asked Questions About Feature Flag
Configuration describes permanent settings of an application, such as the address of the mail server. A feature flag is usually temporary and controls whether a particular feature is visible and to whom. Technically both can live in the same place; the difference is purpose and lifespan.
No. Even a single switch that makes a new feature visible only to your own team at first noticeably lowers the risk of a release. For small projects a simple solution in your own database is enough; a dedicated service only pays off with many flags and audiences.
Release flags as soon as the feature is released to everyone and running stably, usually after a few weeks. Permanent flags, for plan permissions or kill switches, remain but should be documented. A flag without an expiry date and without an owner will very likely be forgotten.
More Terms Starting with "F"
FCP (First Contentful Paint)
FCP measures how long it takes until the first visible content (text, image, SVG) appears in the bro...
First-Party Data
First-Party Data is data that a company collects directly from its own customers and website visitor...
Funnel (Marketing Funnel)
A Marketing Funnel visualizes the customer journey from first contact to purchase and beyond. It hel...
Ready for Your Project?
Apply this knowledge to your website — DLM Digital will help you.