2. Modernize your app
configuration and feature
management with
Azure App Configuration
Callon Campbell
Microsoft MVP | Azure
@flying_maverick
3. About me
• 5x Microsoft MVP in Azure
• +20 years enterprise development with
Microsoft technologies – .NET (C#), Azure,
ASP.NET, Desktop, SQL, and Mobile
• Passionate about serverless and cloud-native
application development and modernization
• Speaker at community events and meetups
• Blogging at https://TheFlyingMaverick.com
• Organizer of “Canada’s Technology Triangle
.NET User Group” in Kitchener, Ontario
Callon Campbell
Azure Architect | Developer
Microsoft Azure MVP
4. Agenda
• What is Azure App Configuration
• Using as a centralized configuration store
• High availability
• Real-time updates
• Demos throughout
• Wrap up
7. Why use App Configuration?
• A fully managed service that can be set up in minutes
• Flexible key representations and mappings
• Tagging with labels
• Point-in-time replay of settings
• Dedicated UI for feature flag management
• Comparison of two sets of configurations on custom-defined dimensions
• Enhanced security through Azure-managed identities
• Encryption of sensitive information at rest and in transit
• Native integration with popular frameworks
8. Complements Azure Key Vault
• App Configuration complements Azure Key Vault, which is used to
store application secrets and easily App Configuration and easily
reference Key Vault secrets
9. Managing feature flags
• Store all feature flags in Azure App Configuration and administer
them from a single place
• Natively supports the .NET feature-flag data schema
• Feature flags are typically a binary value of on or off, but can also be
used with filters (users, devices, browsers, geo, and time windows)
10. Best practices
• Key groupings
• Key prefixes and Labels
• Reduce requests made to App Configuration
• Polling vs Push
• Importing configuration
• Multi-region deployment
• Optimize requests with caching and intelligent refreshing for client
applications
• Leverage in your CI/CD pipelines
11. Scenarios
• Centralize management and distribution of hierarchical configuration
data for different environments and geographies
• Dynamically change application settings without the need to redeploy
or restart an application
• Control feature availability in real-time
14. Resiliency and disaster recovery
• Azure App Configuration is a regional service
• No automatic failover to another region
• Cross-region redundancy is achieved by having multiple App
Configuration stores
16. Synchronization between App Configuration
Stores
• Option 1: Manual backup using
Export functionality
• Option 2: Automatic backup
using Azure Functions and Event
Grid
• Option 3: Enable geo-replication
support (in preview)
The geo-replication feature is currently under preview. It will be the recommended solution for high
availability when the feature is generally available.
19. Reacting to App Configuration events
• React to changes in key-values in real-time
• No complicated code or expensive and inefficient polling services
• Events are pushed through Azure Event Grid
• Reliable delivery services to your applications through rich retry policies and
dead-letter delivery
• Subscribers can be Azure Functions, Azure Logic Apps, or your own custom
http listener
• Only pay for what you use
21. Best practices
• Key groupings
• Key prefixes and Labels
• Reduce requests made to App Configuration
• Polling vs Push
• Importing configuration
• Multi-region deployment
• Optimize requests with caching and intelligent refreshing for client
applications
• Leverage in your CI/CD pipelines
22. Resources
Documentation
• Information on Azure App Configuration
• Azure App Configuration documentation
• Sync your GitHub repository to App Configuration | Microsoft Docs
• Azure App Configuration best practices | Microsoft Docs
Presentation Material
• Slides and demos available on my GitHub:
https://github.com/calloncampbell/2022-FestiveTechCalendar-
AzureAppConfiguration
My name is Callon Campbell, I'm a 5x Microsoft MVP in Azure and have
20+ years in enterprise development with C#, Azure, ASP.NET, SQL and
once upon a time with mobile.
I'm passionate about serverless, cloud-native application development and modernization
and bringing those benefits to the enterprise.
I'm a speaker at local community events, meetups and Global Azure Bootcamp.
What is…
How to use it as a centralized configuration store
Feature management (feature flags)
Lots of demos
It’s built on the simple concept of key-value pairs, this service provides manageability, availability, and ease-of-use. Essentially it helps manage application settings and control their access centrally.
It also simplifies your deployment tasks and eases the burden of dealing with permutations of configurations created by multiple applications, dependencies, and environments.
New: Modern programs, especially programs running in a cloud, generally have many components that are distributed in nature. Spreading configuration settings across these components can lead to hard-to-troubleshoot errors during an application deployment. Use App Configuration to store all the settings for your application and secure their accesses in one place.
You might be asking how this is different from Azure Key Vault. Key Vault is a tool for securely storing and accessing secrets, connection strings, API keys and certificates.
App Configuration is complementary to Key Vault, and the two should be used side by side in most application deployments.
Feature management is a modern software-development practice that decouples feature release from code deployment and enables quick changes to feature availability on demand.
Azure App Configuration provides feature management capabilities for your applications where you can store and administer them from a single place.
Provides support for the .NET feature-flag data schema.
Feature flags can be a simple on/off state, or they make use of a filter to define a rule for evaluating the state of a feature flag. Potential filters include users, groups of users, device or browser types, geographic locations, and time windows.
Azure App Configuration is a regional service, and each configuration store is created in a particular Azure region. So if there is a region-wide outage then it affects all stores in that region.
There is no automatic failover to another region if there is an outage.
You can address this by having multiple app configuration stores in different regions and then updating your applications to support both app configuration stores.
Here is a high-availability architecture.
Application loads its configuration from both app configuration stores in parallel.
You want to arrange your code so that it loads from the secondary store first and then the primary store. This approach ensures that the configuration data in the primary store takes precedence whenever it's available.
Now that our application is updated to support both app configuration stores, we need to address the lack of automatic backup.
Option 1 is to use manual backup with the export/import functionality.
Option 2 is to leverage the app configuration change events with Azure Event Grid and Azure Functions to keep them both in sync.
Option 3 is to enable geo-replication, however, keep in mind this is in preview
Let’s quickly explore option 3.
In the previous demo, we were looking at the default behavior of polling to detect changes in configuration. Once the cached value of setting expire, the next call to TryRefreshAsync or RefreshAsync sends a request to Azure App Configuration to see if the configuration has changed and pulls down the updated configuration as needed.
A better way is to leverage App Configuration events to detect changes and send to Azure Event Grid. Your application can then use these events to optimize how the changes are pushed down to your application.
Applications can choose to subscribe to these events either directly from Azure Event Grid, or though one of the supported event handlers such as a webhook, an Azure function, a Logic App, or a Service Bus topic.
What’s great is that you only pay for what you and when you use it with this behavior.