What is a feature flag

A feature flag is a technic to enable or disable certain features or code segments in an application at runtime.

This way you control the release of new features, you can experiment with functionality, and manage changes with more flexibly.

Why is it good?

Feature flags can be handy for testing, doing some gradual rollouts, and responding quickly to issues by toggling specific features on or off without redeploying the entire application.

Some less obvious benefits.

  • Reduce gap between deployements

By decoupling feature release from code deployment, you can integrate features into the codebase without activating them immediately.

So you can deploy your code to production without releasing the feature themselves.

Minimizing the gap between deployment increase confidence, making deployment less risky because if you keep deploying regularly, the deploy stay small, making easy to know what can be the source of trouble when it arises.

  • Test with specific groups

    Feature flags enable testing with specific user subgroups. You can selectively activate a feature for a subset of users while keeping it hidden for others.

    This targeted approach is useful for user feedback collection. (Think: QA group, management, power users, etc.)

How to do feature flags