.NET Architecture & System Design Interview Question #180

What is feature flagging?

Deployment, Cloud Operations, SRE & Senior System Design Scenarios Senior Advanced

Quick Interview Answer

A feature flag separates feature activation from code deployment. The application can contain new code while configuration determines which users, tenants, or environments can use it.

Detailed Explanation

A feature flag separates feature activation from code deployment. The application can contain new code while configuration determines which users, tenants, or environments can use it.

Flags support gradual rollout and rapid disabling, but long-lived flags create complexity. Ownership, testing of flag combinations, security, and removal of obsolete flags are important operational practices.

Code Example

if (features.IsEnabled("NewCheckout"))
    return NewCheckout();

return ExistingCheckout();