Skip to main content
  1. References/
  2. Architecture Design Basics/
  3. Pattern Taxonomy/
  4. Deployment & Evolution/

Feature Flags

·· 126 words· 1 min

🟠 P1 — decouple deployment from release; essential for large systems

Problem #

Deploying code and releasing features are conflated. You want to deploy frequently (CI/CD) but release features carefully (to specific users, gradually, with kill switches).

Mechanism #

if feature_flags.enabled("new_checkout_flow", user_id=user.id):
    return new_checkout(request)
else:
    return old_checkout(request)

Types #

  • Release flags: Enable/disable features (temporary, remove after rollout)
  • Experiment flags: A/B testing, percentage rollouts
  • Ops flags: Kill switches for degraded mode (“disable recommendations if latency spikes”)
  • Permission flags: Feature access per customer tier

Instinct #

Feature flags are the typical answer to “how do you release safely?” They decouple deployment (code is live) from release (feature is active). The operational discipline: every flag has an owner and an expiry date. Stale flags accumulate technical debt.

References #