In this episode of Azure Friday, Jimmy Campbell is back to show Scott Hanselman how to use App Configuration for feature management. Traditionally, shipping a new application feature requires a complete redeployment of the application itself, and testing a feature often requires multiple deployments of the application. Now you can use feature flags in App Configuration to grant early access to new app functionality in production.
Azure App Configuration helps you manage application settings and control their access centrally. It’s built on the simple concept of key-value pairs, and this service provides manageability, availability, and ease-of-use.
With modern programs, especially programs running in a cloud, you 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. One key recommendation from the Twelve-Factor App guide is to separate configuration from code.
By leveraging Azure App Configuration to store all the settings for your application and secure their accesses in one place, you can simplify your deployment tasks and eases the burden of dealing with permutations of configurations created by multiple applications, dependencies, and environments.
Let’s get started!
Before we can begin you need to make sure you have the following installed and setup:
An Azure Subscription. If you don’t have an Azure Account, you can sign up for one today for free and receive $200 in credits by selecting “Create a Free Azure Account…” or selecting “View->Command Palette” and searching for “Azure: Create an Account”
Next in the search field type ‘app configuration’ and press ‘Enter’. Then click on the Create button to create your Azure App Configuration. Currently this service is in preview but should be generally available soon.
When setting up your Azure App Configuration you will need to specify a few settings like Resource Name, Subscription, Resource Group, Location and Pricing Tier. Here is the resource that I’ll be setting up:
Now click on the Create button to have your resource created, which typically takes a minute or two. You will be notified in the Notifications area of the portal when your resource is ready.
Once your Azure App Configuration is created, navigate to it and you will see the following overview page that shows you your Endpoint for accessing your configurations along with other resource information.
Now navigate to the Configuration explorer to start creating configurations values. Click on the Create button and select Key-value.
Now create a simple configuration called ‘Color’ and give it a value of ‘Blue’ and click Apply.
In order to access your configurations you will need your connection string and key. Navigate to the Access keys section to view your keys and connection string information.
At the time of this writing, Azure App Configuration provides configuration support for ASP.NET Core, .NET Core, .NET Framework, Azure Functions in .NET Core, and Java Spring. For Feature Management, it supports ASP.NET Core, .NET Framework, and Java Spring.
Pricing and General Availability
Earlier this week the Azure App Configuration team announced that Azure App Configuration would be made generally available on February 19, 2020.
Initially there will be two types of plans, Free and Standard. Until February 19 both plans will continue to be free, and after February 19 all plans will be migrated to the Free plan. You can choose to stay on this plan or upgrade to the Standard plan. Pricing has remained unchanged from a previous post and will commence on February 19.
Resources per subscription
Storage per resource
Requests per day
1,000 (HTTP status code 429 will be returned for all requests once the limit is reached)
Unlimited (First 200,000 included in the daily charge. Additional requests will be billed as overage)
Encryption with Microsoft-managed keys HMAC or AAD authentication RBAC support Managed identity
All Free tier functionality plus: Encryption with customer-managed keys Private Link support
US$1.20 per day, plus any overage charge at US$0.06 per 10,000 requests
Azure App Configuration pricing plans
Azure App Configuration is a managed service that helps developers centralize their application and feature settings simply and securely.
I’ve been using it in my applications for the last few months and I love how easy it’s been to incorporate into my applications. I’m really excited that Azure App Configuration is nearing general availability later this month and I’m looking forward to what’s coming next, namely around Feature Management as this is still a simple offering and it will be nice when it’s available on more frameworks.
In my next post I’ll walk through in more detail about how you can import/export your configurations, compare them over time and use labels to filter certain values.