शब्दकोश · मॉनिटरिंग

Feature Flag

A feature flag is a runtime switch that turns code paths on or off without redeploying, letting teams release gradually and disable problem features instantly.

अपडेट: अक्टूबर 14, 2026

A feature flag (or feature toggle) is a conditional in your code controlled by configuration rather than by a deployment. Code ships turned off, then gets enabled for specific users, percentages of traffic, or environments.

Why it matters

Flags separate deploying from releasing. You can ship code on Tuesday and enable it on Thursday, to 1 percent of users first. If monitoring shows trouble, flipping the flag off takes seconds and avoids a full rollback. That keeps the blast radius small.

Example

if (flags.isEnabled("new-checkout", { userId })) {
  return renderNewCheckout();
}
return renderOldCheckout();

A rollout plan might be: internal staff, then 1 percent, 10 percent, 50 percent, 100 percent, with a pause at each step to compare error rate and latency between users with the flag on and off. This is the same idea as a canary release, applied per feature rather than per server.

Common mistakes

  • Leaving old flags in the code for years. Stale flags create untested combinations and confusing behavior. Remove a flag once the rollout is done.
  • Having no default for when the flag service itself is unreachable.
  • Changing flags in production without an audit trail.
  • Not monitoring flag changes, which makes "what changed?" harder during an incident.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

यह पेज सामान्य जानकारी है, जिसे हमारी संपादकीय टीम ने लिखा है और दस्तावेज़ीकरण बदलने पर अपडेट किया जाता है। सर्वर और प्रदाता अलग-अलग होते हैं, इसलिए बदलाव पहले सुरक्षित तरीके से जाँचें। देखें: संपादकीय नीति और अस्वीकरण.