3

We have an application available on more platforms (iOS, Android and multiple backend micro-services: nodeJS, Python). When we develop a new feature and when it’s ready we would like to make it available at the same time on all platforms. And if something’s wrong we’d like to turn it off.

For example:

var featureEnabled = featureService.isMyNewFeatureEnabled();

if (featureEnabled === true) {
    // turn on my new feature
}
else {
    // use my legacy feature
}

What is the best way to do that?

Ashish.S
  • 41
  • 3
  • This is either too broad or asking for an off-site resource like a third party tool. The general answer is: provide an endpoint that returns the `AppConfig` and have your apps consume said endpoint and decide which feature / button / screen to show or not. – luk2302 Jul 23 '19 at 21:07
  • I'm looking for a solution that i can use in my all components and manage my features (on/off) on same place easily. – Ashish.S Jul 23 '19 at 21:18
  • Just to clarify, this category is called "feature flag management". You can also search for for feature flag management tools or feature flag management services. Or even configuration management services since these two are related. – sige Jul 24 '19 at 08:23

3 Answers3

4

Right now we have our own solution implemented. Which I regret very much. At first it seemed like a simple task by having downloadable config JSONs on a server containing the feature flag values. And a minimalistic admin page to edit them. Compexity raised when we wanted to add exceptions. Like serving a value for one user group and another value for another segment. So called A/B testing. After trying to hack this feature in our current solution we managed to convince management and got a proper feature flag service.

These are the ones we evaluated:

Peter
  • 1,591
  • 6
  • 19
1

As mentioned in the comments to the question, what you are looking for is "Feature flag management" aka "Feature toggle management", the terms are mixed but are the same. Feature flags do enable different patterns or activation strategies. Examples are among them you describe;

  • "Kill switches", e.g. an easy way to disable a feature in production in case there are an issue
  • "Release toggle", e.g. enable the feature after the code is deployed into production

Most Feature flag management systems will support the above and more activation strategies.

It is quite common to start by building such tools internally, essentially it is simple: Only a simple flag and a handful of if-statements. Your challenge is once you get dependent on your feature flag management. Usually you would need audit log capabilities, proper user management handling, proper scaling, ensure limited performance impact and similar capabilities. A nice introduction to feature toggle best practices to consider is found in this blog post.

There are multiple strong offerings available, these are the top four:

1

There is a very good summary here on stackoverflow about feature flags: What is a "feature flag"?

mon
  • 248
  • 3
  • 8