From the course: Azure for DevOps: Designing a Strategy

Understand and implement feature flags - Azure Tutorial

From the course: Azure for DevOps: Designing a Strategy

Start my 1-month free trial

Understand and implement feature flags

- [Instructor] Feature flags, a feature flag is a way to control the exposure of your features to your customers. Some of the pros to features are, they mitigate risk. You can control the rollback of your product or feature immediately if you detect a bug or encounter negative feedback that could cost you your reputation. Controls who sees what, you control which features are turned on and off for each customer with the flip of a switch. Control your launch, roll out to small increments of customers over a specified period of time. Measuring impact, by rolling out small increments, it's easy to monitor and measure the impact as it's happening. Live features, make changes to live features without having to redeploy or require app store updates. Gathering feedback, gather feedback from the group to help you gain confidence needed to slowly release the feature to more and more customers. If the feature has bugs or you're receiving negative feedback, you have the power to turn it off. Some of the cons to feature flags are, the code is harder to test. While feature flags are useful, they can also introduce many issues of their own. As soon as you introduce a feature flag, you have added to your overall technical debt. And just like other technical debt, they are easy to add, but the longer they're in the code, the bigger technical debt becomes, because you've added scaffolding logic that's needed for branching within the code. The cyclomatic complexity of your code increases as you add more feature flags, as the number of possible paths through your code increases. The code is harder to maintain, and the code may be less secure. Again, you're increasing the cyclomatic complexity, you're adding more lines of code, and more conditional logic in the code that's going to make it harder to maintain. And because you're increasing the attack surface, it could at times make it less secure. And it's harder to duplicate problems when found, again, because you're having to walk through different scenarios and different paths in your code, it's going to take a little longer to maybe to solve the problem that you're running into or your customers are running into.

Contents