Feature Flag
A feature flag (also called a feature toggle) is a configuration mechanism that lets teams turn a piece of functionality on or off at runtime, without deploying new code, decoupling code deployment from feature release.
Definition
A feature flag (also called a feature toggle) is a configuration mechanism that lets teams turn a piece of functionality on or off at runtime, without deploying new code, decoupling code deployment from feature release.
Overview
Feature flags wrap a piece of functionality in a conditional check against a remote or local configuration value, so that a feature can be shipped to production in a disabled state and then enabled later — for everyone, for a specific percentage of users, or for a targeted segment — without a new deployment. This separation of "deploy" from "release" lets teams merge and ship code continuously while still controlling exactly when and to whom a feature becomes visible. Flags are commonly used to implement gradual rollouts similar to canary deployment, to run A/B tests comparing feature variants, and as operational kill switches that can instantly disable a problematic feature without requiring a rollback or redeploy. Dedicated feature-flag services and platforms — including capabilities built into broader delivery platforms like Harness — provide targeting rules, audit logs, and real-time flag updates so changes propagate to running applications without a restart. Because flags accumulate over time, teams need discipline to remove stale flags once a feature is fully released or abandoned; otherwise the codebase accumulates conditional branches that add complexity and risk. Feature flags are often used alongside deployment strategies such as rolling deployment or blue-green deployment, giving teams two independent levers — infrastructure-level traffic routing and application-level flags — for controlling risk during a release.
Key Concepts
- Runtime toggles that decouple code deployment from feature release
- Percentage-based or segment-based rollout targeting
- Kill-switch capability to instantly disable a problematic feature
- Support for A/B testing and experimentation
- Real-time flag updates without redeploying or restarting the application
- Audit logging of who changed which flag and when
Use Cases
Frequently Asked Questions
From the Blog
Feature Engineering: Turning Data Into Signal
Feature engineering turns raw columns into inputs a model can actually learn from. Learn the core techniques that often matter more than the algorithm itself.
Read More Data ScienceWhat Is Feature Engineering in Machine Learning?
Feature engineering is transforming raw data into inputs that help models learn. Good features often matter more than the algorithm. Learn the core techniques here.
Read More Data ScienceWhat Is Feature Scaling in Machine Learning
Feature scaling puts numeric inputs on a comparable range so no single feature dominates a model. Learn normalization, standardization, and when each matters.
Read More Data ScienceA Practical Feature Engineering Playbook for Tabular Data
Feature engineering for tabular data is best organised by data type and model family, with a validation loop that proves each feature earns its place. Learn how to treat numeric, categorical, temporal and event data differently, avoid leakage, and decide which transformations gradient-boosted trees genuinely need versus which only linear models do.
Read More