Содержание
Environment
When setting up the feature flighting system you will need to specify the Environment. Each environment can be sub-divided into multiple sub environments. For e.g., in many cases we sub-divide the Pre-Production environment into Dev, SIT and UAT. The advantage of using of using sub-environments is cost and resource optimization. 1 instance of Azure App Configuration is required per Environment, and all sub-environments of the parent environment can share the same Azure App Configuration resource.
To ensure that 1 tenant can have have feature flag in 2 sub-environment the sub-environment is added to the feature flag ID by the system. This is done automatically, partners wont have to keep this in mind while creating feature flags.
The main parent environment is added as the Label to the feature flags. So for more resource optimization you can use the same Azure App Configuration for main environments as well (although we suggest using a separate instance for Production workloads).
Detecting Environment
The environment is sent via the x-environment
header to all the APIs. The environment here refers to the sub-environments. The concept of main environment is for the Feature Flighting System, clients use the sub-environment. So for PPE if you have 2 sub-environments - Dev and UAT, then clients need to pass either Dev
or UAT
in the x-environment
header.
Suggestion
We suggest having 2 Azure App Configurations - one for Production and other for non-production workloads. For any other environments, fork the Non-Production environment into multiple sub-environments.
Setup
Check the configuration section to see how you can setup environment configurations