Use Microsoft.FeatureManagement library to add feature flags to your .Net Core applications and the use Azure App Configuration Feature Management capabilities to manage feature flags in a central location.
Feature Toggle for .Net Core Apps on Azure with Azure App Configuration Feature Management
1. Feature Toggle for .Net Core Apps on
Azure with Azure App Configuration
Feature Management
Kasun Kodagoda
Technical Lead | 99X Technology
https://kasunkodagoda.com
2. I am, Kasun Kodagoda
• In ♥ with Azure & Azure DevOps
• Active Blogger – https://kasunkodagoda.com
• Open Source Contributor - https://github.com/kasunkv
• Technical Lead
I Work For,
• Established in 2004
• Headquartered in Sri Lanka with offices in
Europe and Australia
• Providing high quality, high value Software
Product Engineering + R&D services
3. What Are Feature Flags?
A feature flag is a variable with a binary state
of on or off. The feature flag also has an
associated code block. The state of the feature
flag determines whether the code block runs or
not
4. Why Use Feature Flags?
• Reduce branching in your source control
• Feature development is hidden under feature flags, therefore safe to deploy to prod.
• Support incremental rollout of features
• Expose to certain percentage of users, get feedback, improve and fully expose.
• Testing in production
• Expose features to a certain segment of users, beta users, internal team. Get feedback
• Act as an instant kill switch
• Turn off features quickly to without redeploying.
• Selective activation of features
• Long term feature flags. E.g. enable features for certain browsers as browser support comes.
5. Microsoft.FeatureManagement Library
• Created by Azure team
• Built on .Net Core Configuration
• Supports any IConfiguration provider
• Supports feature flag lifetime management
• Simple on/off feature flags to complex conditional flags
• Supports creating custom feature filters
• Support for ASP.Net Core MVC applications
• Microsoft.FeatureManagement.AspNetCore library
• Extension points for Routing, Filters, Action, Middleware and Razor Views
6. Concepts
• Feature Flag
• Consists of 2 parts;
• Feature name
• List of feature filters
• Filter can be a simple or complex filter
• Can contain multiple feature filters
• Feature Filter
• Defines a scenario where feature should be enabled
• List of feature filters are traversed until one feature filter
evaluates for enabling the feature
• The rest of the filters are ignored
7. Let’s See it in Action
Microsoft.FeatureManagement.AspNetCore
9. What is Azure App Configuration?
Azure App Configuration is service that allows
you to centrally managed application settings
and feature flags.
10. Why Use Azure App Configuration?
• Modern cloud applications are distributed
• multiple instances running across many geographic locations
• Managing application settings across these distributed instances is
hard
• difficult to troubleshoot issue when it comes up
• Having the stored in a centralized location will solve this issues
• Best practice to separate application settings from application code
11. Azure App Configuration Features
• Full Managed Service
• Flexible Key Representation
• Key Tagging with Labels
• Point In Time Snapshots for Settings
• Feature Flag Management UI
• Encryption at Rest and on Transit
• Support for Managed Identities
12. App Configuration Feature Management
• Define simple and conditional feature flags
• Simple Flags – On/Off
• Conditional Flags – On by default with feature filters
• Backed by App Configuration
• Define labels for multi-dimensional feature flags
• Same feature flag name
• Different values depending on Label
• Dedicated Feature Flag Management UI
Modern cloud applications are distributed, they can have multiple instances running across many geographic locations
Managing application settings across these distributed instances is difficult
Its difficult to troubleshoot issue when it comes up
Having the stored in a centralized location will solve this issues
Modern cloud applications are distributed, they can have multiple instances running across many geographic locations
Managing application settings across these distributed instances is difficult
Its difficult to troubleshoot issue when it comes up
Having the stored in a centralized location will solve this issues
Modern cloud applications are distributed, they can have multiple instances running across many geographic locations
Managing application settings across these distributed instances is difficult
Its difficult to troubleshoot issue when it comes up
Having the stored in a centralized location will solve this issues
]
Modern cloud applications are distributed, they can have multiple instances running across many geographic locations
Managing application settings across these distributed instances is difficult
Its difficult to troubleshoot issue when it comes up
Having the stored in a centralized location will solve this issues