SlideShare a Scribd company logo
1 of 26
Using feature flags in an
ASP.NET Core app on
Azure
Joonas Westlin
Speaker intro
• Joonas Westlin
• Developer / Architect @ Zure
• Worked with Azure for 8 years
@JoonasWestlin
joonasw.net
Contents
• What are feature flags?
• What scenarios are they used for?
• Microsoft.FeatureManagement library
• Azure App Configuration
Please ask questions whenever!
Links at the end for the slides and samples
What are feature flags?
What are feature flags?
• Aka “feature toggles”
• Allow you to modify system behaviour without modifying the code
• “Toggle points” decide where the code flow should go based on the flag
Calculate bonus
accrued for
purchase
Algorithm
version 1
Algorithm
version 2
Toggle point
Really low-level flags
Flag in an environment variable
What kind of scenarios
are feature flags used in?
What kind of scenarios are feature
flags used in?
1. Enable a new feature only in Dev/Test
• Aka “release toggles”
• Enable deployments while feature is in progress
2. Canary release of feature
• Test feature with small portion, release to rest if good
3. A/B testing
• Compare versions through metrics
4. Opt-in public previews
• Users can preview upcoming changes and give feedback
5. Premium features
• Enabled for users who have paid a higher fee
Microsoft.FeatureManagement
• Library for handling feature flags in .NET
applications
• Can use for simple on/off feature flags + more
complex scenarios
• Filters specify conditions when a feature should be
enabled, custom logic
• Integrates with ASP.NET Core
• Integrates with Azure App Configuration
Flags in appsettings.json
Imperative flag check
Feature gates on controller actions
Feature tag helper
Demo
On/Off flag
Azure App Configuration
• Central management of settings and feature flags
• Can be a shared store for multiple services
• Change settings without application restarts
• Azure AD/access key authentication
• Store secrets in Key Vault and refer to them in settings
• Free and Standard tier
Setting a feature flag
Demo
On/Off flag with Azure App Configuration
https://flags.joonasw.net
Release toggles
• Long development time, want to keep it hidden from users until it’s
ready
• Still want to be able to deploy often
• Release toggles hide/disable features until they are ready to be released
Deploy version,
enabled in dev/test,
disabled in prod
Deploy new version,
enabled in all
environments
Canary testing
• Deploy feature first to subset of users
• Ensure everything runs OK
• Deploy feature to more users
• If problems arise, only subset of users affected
Deploy version
Enable feature
for random 20%
Check telemetry
for some time
Enable feature
for all users
Opt-in public previews
• Give users the choice to try new features
• Users tend to allow issues/worse performance etc. in this case
• Get feedback
Deploy version
Users can opt in
to feature
Deploy new
version, enabled
for all users
Demo
Release toggles
Canary testing
Opt-in public preview
https://flags.joonasw.net
Thoughts/Conclusions
• Use feature flags to change system behaviour per environment/per user
etc.
• Feature flags come with a cost, try to minimize their amount
• Try to minimize the amount of toggle points for a feature as well
• Remove flags once they become unnecessary
• Except for “premium features” etc.
• Usage of Microsoft.FeatureManagement library is recommended
• Azure App Configuration is very useful as a configuration/feature flag
store
Links
• Presentation: https://westl.in/featureflags
• Sample code: https://github.com/juunas11/AspNetCoreFeatureFlags
• Articles on feature flags:
• https://martinfowler.com/articles/feature-toggles.html
• https://www.atlassian.com/continuous-delivery/principles/feature-flags
• Microsoft.FeatureManagement:
https://github.com/microsoft/FeatureManagement-Dotnet
• Azure App Configuration: https://learn.microsoft.com/en-us/azure/azure-
app-configuration/overview
Questions?
Using feature flags in an ASP.NET Core app on Azure

More Related Content

Similar to Using feature flags in an ASP.NET Core app on Azure

Software Mobile Website Quality assurance framework design
Software Mobile Website Quality assurance framework designSoftware Mobile Website Quality assurance framework design
Software Mobile Website Quality assurance framework designBonnie Yau
 
Optimize your delivery and quality with the right release methodology and too...
Optimize your delivery and quality with the right release methodology and too...Optimize your delivery and quality with the right release methodology and too...
Optimize your delivery and quality with the right release methodology and too...DroidConTLV
 
Cucumber jvm best practices v3
Cucumber jvm best practices v3Cucumber jvm best practices v3
Cucumber jvm best practices v3Ahmed Misbah
 
Launch safely with Feature Flags
Launch safely with Feature FlagsLaunch safely with Feature Flags
Launch safely with Feature FlagsWise Engineering
 
Infrastructure as Code for Network
Infrastructure as Code for NetworkInfrastructure as Code for Network
Infrastructure as Code for NetworkDamien Garros
 
Testing types functional and nonfunctional - Kati Holasz
Testing types   functional and nonfunctional - Kati HolaszTesting types   functional and nonfunctional - Kati Holasz
Testing types functional and nonfunctional - Kati HolaszHolasz Kati
 
Cloud-based Test Microservices JavaOne 2014
Cloud-based Test Microservices JavaOne 2014Cloud-based Test Microservices JavaOne 2014
Cloud-based Test Microservices JavaOne 2014Shelley Lambert
 
The State of OpenStack Product Management
The State of OpenStack Product ManagementThe State of OpenStack Product Management
The State of OpenStack Product ManagementTesora
 
Feature Toggle
Feature ToggleFeature Toggle
Feature ToggleBryan Liu
 
Advanced A/B Testing at Wix - Aviran Mordo and Sagy Rozman, Wix.com
Advanced A/B Testing at Wix - Aviran Mordo and Sagy Rozman, Wix.comAdvanced A/B Testing at Wix - Aviran Mordo and Sagy Rozman, Wix.com
Advanced A/B Testing at Wix - Aviran Mordo and Sagy Rozman, Wix.comDevOpsDays Tel Aviv
 
"Flagging your features — a DevOps approach to continuous release", Alex Thissen
"Flagging your features — a DevOps approach to continuous release", Alex Thissen"Flagging your features — a DevOps approach to continuous release", Alex Thissen
"Flagging your features — a DevOps approach to continuous release", Alex ThissenFwdays
 
Scriptless Automation Testing: A Unique Framework To Accelerate Delivery
Scriptless Automation Testing: A Unique Framework To Accelerate DeliveryScriptless Automation Testing: A Unique Framework To Accelerate Delivery
Scriptless Automation Testing: A Unique Framework To Accelerate DeliveryNet Solutions
 
Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)CIVEL Benoit
 
Cerberus_Presentation1
Cerberus_Presentation1Cerberus_Presentation1
Cerberus_Presentation1CIVEL Benoit
 
KrishnaToolComparisionPPT.pdf
KrishnaToolComparisionPPT.pdfKrishnaToolComparisionPPT.pdf
KrishnaToolComparisionPPT.pdfQA or the Highway
 
Testing for Logic App Solutions | Integration Monday
Testing for Logic App Solutions | Integration MondayTesting for Logic App Solutions | Integration Monday
Testing for Logic App Solutions | Integration MondayBizTalk360
 
Best Practices for DevOps in Mobile App Testing
Best Practices for DevOps in Mobile App TestingBest Practices for DevOps in Mobile App Testing
Best Practices for DevOps in Mobile App TestingBitbar
 
Zen Test Labs Mobile Application Testing
Zen Test Labs Mobile Application TestingZen Test Labs Mobile Application Testing
Zen Test Labs Mobile Application TestingZen Test Labs
 
The QA/Testing Process
The QA/Testing ProcessThe QA/Testing Process
The QA/Testing ProcessSynerzip
 

Similar to Using feature flags in an ASP.NET Core app on Azure (20)

Software Mobile Website Quality assurance framework design
Software Mobile Website Quality assurance framework designSoftware Mobile Website Quality assurance framework design
Software Mobile Website Quality assurance framework design
 
Optimize your delivery and quality with the right release methodology and too...
Optimize your delivery and quality with the right release methodology and too...Optimize your delivery and quality with the right release methodology and too...
Optimize your delivery and quality with the right release methodology and too...
 
Cucumber jvm best practices v3
Cucumber jvm best practices v3Cucumber jvm best practices v3
Cucumber jvm best practices v3
 
Launch safely with Feature Flags
Launch safely with Feature FlagsLaunch safely with Feature Flags
Launch safely with Feature Flags
 
Mobile Quality Assurance
Mobile Quality AssuranceMobile Quality Assurance
Mobile Quality Assurance
 
Infrastructure as Code for Network
Infrastructure as Code for NetworkInfrastructure as Code for Network
Infrastructure as Code for Network
 
Testing types functional and nonfunctional - Kati Holasz
Testing types   functional and nonfunctional - Kati HolaszTesting types   functional and nonfunctional - Kati Holasz
Testing types functional and nonfunctional - Kati Holasz
 
Cloud-based Test Microservices JavaOne 2014
Cloud-based Test Microservices JavaOne 2014Cloud-based Test Microservices JavaOne 2014
Cloud-based Test Microservices JavaOne 2014
 
The State of OpenStack Product Management
The State of OpenStack Product ManagementThe State of OpenStack Product Management
The State of OpenStack Product Management
 
Feature Toggle
Feature ToggleFeature Toggle
Feature Toggle
 
Advanced A/B Testing at Wix - Aviran Mordo and Sagy Rozman, Wix.com
Advanced A/B Testing at Wix - Aviran Mordo and Sagy Rozman, Wix.comAdvanced A/B Testing at Wix - Aviran Mordo and Sagy Rozman, Wix.com
Advanced A/B Testing at Wix - Aviran Mordo and Sagy Rozman, Wix.com
 
"Flagging your features — a DevOps approach to continuous release", Alex Thissen
"Flagging your features — a DevOps approach to continuous release", Alex Thissen"Flagging your features — a DevOps approach to continuous release", Alex Thissen
"Flagging your features — a DevOps approach to continuous release", Alex Thissen
 
Scriptless Automation Testing: A Unique Framework To Accelerate Delivery
Scriptless Automation Testing: A Unique Framework To Accelerate DeliveryScriptless Automation Testing: A Unique Framework To Accelerate Delivery
Scriptless Automation Testing: A Unique Framework To Accelerate Delivery
 
Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)
 
Cerberus_Presentation1
Cerberus_Presentation1Cerberus_Presentation1
Cerberus_Presentation1
 
KrishnaToolComparisionPPT.pdf
KrishnaToolComparisionPPT.pdfKrishnaToolComparisionPPT.pdf
KrishnaToolComparisionPPT.pdf
 
Testing for Logic App Solutions | Integration Monday
Testing for Logic App Solutions | Integration MondayTesting for Logic App Solutions | Integration Monday
Testing for Logic App Solutions | Integration Monday
 
Best Practices for DevOps in Mobile App Testing
Best Practices for DevOps in Mobile App TestingBest Practices for DevOps in Mobile App Testing
Best Practices for DevOps in Mobile App Testing
 
Zen Test Labs Mobile Application Testing
Zen Test Labs Mobile Application TestingZen Test Labs Mobile Application Testing
Zen Test Labs Mobile Application Testing
 
The QA/Testing Process
The QA/Testing ProcessThe QA/Testing Process
The QA/Testing Process
 

More from Joonas Westlin

Deep Dive into Durable Functions
Deep Dive into Durable FunctionsDeep Dive into Durable Functions
Deep Dive into Durable FunctionsJoonas Westlin
 
Deep Dive into Durable Functions
Deep Dive into Durable FunctionsDeep Dive into Durable Functions
Deep Dive into Durable FunctionsJoonas Westlin
 
Zero Credential Development with Managed Identities
Zero Credential Development with Managed IdentitiesZero Credential Development with Managed Identities
Zero Credential Development with Managed IdentitiesJoonas Westlin
 
Zero Credential Development with Managed Identities
Zero Credential Development with Managed IdentitiesZero Credential Development with Managed Identities
Zero Credential Development with Managed IdentitiesJoonas Westlin
 
Building a document e-signing workflow with Azure Durable Functions
Building a document e-signing workflow with Azure Durable FunctionsBuilding a document e-signing workflow with Azure Durable Functions
Building a document e-signing workflow with Azure Durable FunctionsJoonas Westlin
 
Zero credential development with managed identities
Zero credential development with managed identitiesZero credential development with managed identities
Zero credential development with managed identitiesJoonas Westlin
 
Zero credential development with managed identities
Zero credential development with managed identitiesZero credential development with managed identities
Zero credential development with managed identitiesJoonas Westlin
 
Zero Credential Development with Managed Identities for Azure resources
Zero Credential Development with Managed Identities for Azure resourcesZero Credential Development with Managed Identities for Azure resources
Zero Credential Development with Managed Identities for Azure resourcesJoonas Westlin
 
Zero Credential Development with Managed Identities
Zero Credential Development with Managed IdentitiesZero Credential Development with Managed Identities
Zero Credential Development with Managed IdentitiesJoonas Westlin
 
7 Deadly Sins in Azure AD App Development
7 Deadly Sins in Azure AD App Development7 Deadly Sins in Azure AD App Development
7 Deadly Sins in Azure AD App DevelopmentJoonas Westlin
 
Introduction to Azure AD and Azure AD B2C
Introduction to Azure AD and Azure AD B2CIntroduction to Azure AD and Azure AD B2C
Introduction to Azure AD and Azure AD B2CJoonas Westlin
 
Get rid of credentials from your code: Using Managed identities for Azure res...
Get rid of credentials from your code: Using Managed identities for Azure res...Get rid of credentials from your code: Using Managed identities for Azure res...
Get rid of credentials from your code: Using Managed identities for Azure res...Joonas Westlin
 
Programming with Azure Active Directory
Programming with Azure Active DirectoryProgramming with Azure Active Directory
Programming with Azure Active DirectoryJoonas Westlin
 

More from Joonas Westlin (13)

Deep Dive into Durable Functions
Deep Dive into Durable FunctionsDeep Dive into Durable Functions
Deep Dive into Durable Functions
 
Deep Dive into Durable Functions
Deep Dive into Durable FunctionsDeep Dive into Durable Functions
Deep Dive into Durable Functions
 
Zero Credential Development with Managed Identities
Zero Credential Development with Managed IdentitiesZero Credential Development with Managed Identities
Zero Credential Development with Managed Identities
 
Zero Credential Development with Managed Identities
Zero Credential Development with Managed IdentitiesZero Credential Development with Managed Identities
Zero Credential Development with Managed Identities
 
Building a document e-signing workflow with Azure Durable Functions
Building a document e-signing workflow with Azure Durable FunctionsBuilding a document e-signing workflow with Azure Durable Functions
Building a document e-signing workflow with Azure Durable Functions
 
Zero credential development with managed identities
Zero credential development with managed identitiesZero credential development with managed identities
Zero credential development with managed identities
 
Zero credential development with managed identities
Zero credential development with managed identitiesZero credential development with managed identities
Zero credential development with managed identities
 
Zero Credential Development with Managed Identities for Azure resources
Zero Credential Development with Managed Identities for Azure resourcesZero Credential Development with Managed Identities for Azure resources
Zero Credential Development with Managed Identities for Azure resources
 
Zero Credential Development with Managed Identities
Zero Credential Development with Managed IdentitiesZero Credential Development with Managed Identities
Zero Credential Development with Managed Identities
 
7 Deadly Sins in Azure AD App Development
7 Deadly Sins in Azure AD App Development7 Deadly Sins in Azure AD App Development
7 Deadly Sins in Azure AD App Development
 
Introduction to Azure AD and Azure AD B2C
Introduction to Azure AD and Azure AD B2CIntroduction to Azure AD and Azure AD B2C
Introduction to Azure AD and Azure AD B2C
 
Get rid of credentials from your code: Using Managed identities for Azure res...
Get rid of credentials from your code: Using Managed identities for Azure res...Get rid of credentials from your code: Using Managed identities for Azure res...
Get rid of credentials from your code: Using Managed identities for Azure res...
 
Programming with Azure Active Directory
Programming with Azure Active DirectoryProgramming with Azure Active Directory
Programming with Azure Active Directory
 

Recently uploaded

EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 

Recently uploaded (20)

EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 

Using feature flags in an ASP.NET Core app on Azure

  • 1. Using feature flags in an ASP.NET Core app on Azure Joonas Westlin
  • 2. Speaker intro • Joonas Westlin • Developer / Architect @ Zure • Worked with Azure for 8 years @JoonasWestlin joonasw.net
  • 3. Contents • What are feature flags? • What scenarios are they used for? • Microsoft.FeatureManagement library • Azure App Configuration Please ask questions whenever! Links at the end for the slides and samples
  • 5. What are feature flags? • Aka “feature toggles” • Allow you to modify system behaviour without modifying the code • “Toggle points” decide where the code flow should go based on the flag Calculate bonus accrued for purchase Algorithm version 1 Algorithm version 2 Toggle point
  • 7. Flag in an environment variable
  • 8. What kind of scenarios are feature flags used in?
  • 9. What kind of scenarios are feature flags used in? 1. Enable a new feature only in Dev/Test • Aka “release toggles” • Enable deployments while feature is in progress 2. Canary release of feature • Test feature with small portion, release to rest if good 3. A/B testing • Compare versions through metrics 4. Opt-in public previews • Users can preview upcoming changes and give feedback 5. Premium features • Enabled for users who have paid a higher fee
  • 10. Microsoft.FeatureManagement • Library for handling feature flags in .NET applications • Can use for simple on/off feature flags + more complex scenarios • Filters specify conditions when a feature should be enabled, custom logic • Integrates with ASP.NET Core • Integrates with Azure App Configuration
  • 13. Feature gates on controller actions
  • 16. Azure App Configuration • Central management of settings and feature flags • Can be a shared store for multiple services • Change settings without application restarts • Azure AD/access key authentication • Store secrets in Key Vault and refer to them in settings • Free and Standard tier
  • 18. Demo On/Off flag with Azure App Configuration https://flags.joonasw.net
  • 19. Release toggles • Long development time, want to keep it hidden from users until it’s ready • Still want to be able to deploy often • Release toggles hide/disable features until they are ready to be released Deploy version, enabled in dev/test, disabled in prod Deploy new version, enabled in all environments
  • 20. Canary testing • Deploy feature first to subset of users • Ensure everything runs OK • Deploy feature to more users • If problems arise, only subset of users affected Deploy version Enable feature for random 20% Check telemetry for some time Enable feature for all users
  • 21. Opt-in public previews • Give users the choice to try new features • Users tend to allow issues/worse performance etc. in this case • Get feedback Deploy version Users can opt in to feature Deploy new version, enabled for all users
  • 22. Demo Release toggles Canary testing Opt-in public preview https://flags.joonasw.net
  • 23. Thoughts/Conclusions • Use feature flags to change system behaviour per environment/per user etc. • Feature flags come with a cost, try to minimize their amount • Try to minimize the amount of toggle points for a feature as well • Remove flags once they become unnecessary • Except for “premium features” etc. • Usage of Microsoft.FeatureManagement library is recommended • Azure App Configuration is very useful as a configuration/feature flag store
  • 24. Links • Presentation: https://westl.in/featureflags • Sample code: https://github.com/juunas11/AspNetCoreFeatureFlags • Articles on feature flags: • https://martinfowler.com/articles/feature-toggles.html • https://www.atlassian.com/continuous-delivery/principles/feature-flags • Microsoft.FeatureManagement: https://github.com/microsoft/FeatureManagement-Dotnet • Azure App Configuration: https://learn.microsoft.com/en-us/azure/azure- app-configuration/overview

Editor's Notes

  1. Demo the NewsSummary flag locally, start with it disabled and switch it to enabled while the app is running. Refresh the page and see that the news block is now shown. Show how the Feature Management library has been added and talk briefly about the configuration file format.
  2. Pretty much same demo as the first one, but this time in the Azure app. Audience can participate by “creating” a user. Start with the flag disabled, toggle it on in App Configuration, refresh page until feature is enabled. Show the code for enabling App Configuration in the app. Show the RBAC role assigned to the App Service.