Primitive feature flags vs Feature management system

Feature management system requirements, Part 1

Ondrej Kvasnovsky
3 min readMay 24, 2022

There are two ways to approach feature flags:

  1. Use a primitive feature flag using environment variables or database
  2. Use a feature management system

We are going to look at the primitive implementations of feature flags to fully understand and appreciate the benefits of a feature management system.

A primitive feature flag can be defined as an environment variable.

if ENV['MY-FEATURE'].enabled {
// show the feature
} else {
// hide the feature
}

It can be also defined as a column or field in a database, but those implementations can become quite complex, so we will not go there.

Primitive feature flag implementations are very limiting because:

  • it is very difficult to target a feature flag to specific users, or user segments, or do a percentage rollout
  • it is not clear who is responsible for each feature flag, which puts us in a situation where we don’t know whom to talk to about specific feature flags
  • feature flags are not cleaned up after they are not needed, which makes the code more complex over time, polluted with old feature flags that are always set to the same value
  • there is no central place to easily see all the feature flags, which makes it is difficult to do changes without studying all environment variables for all the services and going through the code that is using them
  • feature flags have to be managed (enabled, disabled) only by developers because only the developers have access to change environment variables, which makes it difficult for operations to work with the feature flag, they always have to ask the developers to change it, because they are not able to redeploy the services or access database themself or they just don’t dare to do it
  • the usage of feature flags is unknown, which makes it very difficult to know if we can decommission a feature because we don’t know whether our users are using a feature or not, also we don’t know what variant of a feature flag (e.g. true or false) the users are getting

There is an amazing book Effective Feature Management by https://launchdarkly.com. If you read it, you will get a solid understanding of what can a feature management system do for your project and team.

https://resources.launchdarkly.com/ebooks/effectivefeaturemanagement-launchdarkly

We have identified our requirements for the feature flag management system after studying the Effective Feature Management book and discovering what we didn’t know about feature flags.

I think that the requirements we found are capturing or utilizing the main advantages of feature management systems.

The next following post talks about our first and most important requirement for the feature management system, which is to decouple releases from deployment: Decoupling releases from deployment.

Related articles

--

--

Responses (1)