-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Would like to understand the default percentage option under Targeting filter #527
Comments
The default percentage determines the probability that a feature flag will be enabled for any given request. If you set the default percentage to 50%, it means that, on average, 50% of the calls will return true (feature enabled) and 50% will return false (feature disabled). However, this doesn’t guarantee an exact split within a specific timeframe or number of calls. For example, if 10 calls are made within an hour, it’s possible that not exactly 5 will return true and 5 will return false. The distribution is random, so you might see variations like 6 true and 4 false, or 3 true and 7 false, etc. |
@jimmyca15 Thanks for the reply.
In our case we are using in our client WPF application, and App configuration SDK calling the CDN instead of Azure App configuration API. we see the CDN has the below configuration
In this case how does SDK handle the DefaultRolloutPercentage of 50% rollout? |
Hi, @sathishkumarkaliavaradhan The targeting filter is based on targeting context. For more information, please go to doc We have algorithm to determine whether the certain targeting context should be targeted of not, more specificly speaking, which percentage where the targeting context will fall. And the targeting behavior is "sticky", which means the same targeting context will always fall into the same percentage. Worth to mention that the algorithm is consistent across all microsoft feature management libraries of all languages.
In your example, you have two feature filters, by default, the filter behavior should be "if any filter is passed, then the feature flag is considered as enabled". For more information, please go to doc. For the targeting filter, you should assign/generate a targeting context for each call.
If all 10 calls come from the same device or user, then all of them should be targeted or not. If different calls have different targeting context, then the bahavior will be like @jimmyca15 mentioned in the comment Code implementation: |
@zhiyuanliang-ms Thanks for the reply. Based on the documentation here - https://learn.microsoft.com/en-us/azure/azure-app-configuration/howto-targetingfilter we thought of AND operation with multiple filters. how do we add the "requirement_type": "All" in case of multiple filters? when this feature got released? As I have mentioned in my previous post we are using the Feature flag in our WPF application. We also have noticed the feature flag result is flipping between (true/false) based the this configuration below
Since you have mentioned as one condition is true then result is true so in our case first condition is true always. but still we see that result is not 100% true, 10% of the calls are flipping between true/false. we pass only target context which has app version evaluation. did you experience this problem / what would be the wrong in our configuration? Thanks again for the reply and documentation links. |
It was released in 2.6.0. release note The example in the release has been out of date. Now we have adapted to For how "requirement_type" works, I think this doc explains it well. To configure it on the Azure portal: you can click this: By default, the |
Yes. We provide two client libraries: 1. configuration provider 2. feature management |
Can you provide the full configuration of the feature flag? Are you sure about that the Could you create a simple example in a github repo or provide some code snippet to let me reproduce the issue? |
@zhiyuanliang-ms We have our feature flag configuration likes below
which doesn't have |
Yes, we have implemented the app version condition which is making sure our app version is above or equal 5.5.0.0 version which is true. because we have other feature flag with only one condition with |
Yes, we are using the both library AzureAppConfiguration (6.0.0) and feature management (2.5.1). since it's WPF desktop application we don't have request middleware hooked up like ASP.NET Core WebAPI, we are calling the refresher every time before evaluation.
Production we are not using the configuration from locally, and we set the cacheexpriationInterval
Please let us know if you see any issue with our configuration. |
Requirement Type was added in In "FeatureW": {
"RequirementType": "All",
"EnabledFor": []
} When using the server (like in your production scenario), you'll also need to update AzureAppConfiguration to Not sure your situation, but I'd recommend updating fully to our latest FeatureManagement |
Hi, @sathishkumarkaliavaradhan
As @rossgrambo mentioned, you should upgrade to our latest client libraries. BTW, can you also share the code snippet about how you register/add feature management and feature filter? Did you have However, I notice that you are passing |
Thanks @rossgrambo @jimmyca15 @zhiyuanliang-ms for your reply and sorry for the delay. Please find the attached code snippet of our code. For this sample application, I used the latest FeatureManagement 4.0.0 and AzureAppConfiguration 8.0.0. Because of We would like to use the multiple condition e.g percentage rollout and app version / any other combinations. Feel free to change the code if required. |
As I mentioned earlier our client calls the CDN endpoint to fetch the Feature flag configuration. As per your recommendation we clicked the checkbox "Require all above feature filter to be enabled" in Azure Portal but still we didn't get the I am not sure do we have to upgrade anything on the Azure portal to use the |
Hi @rossgrambo @jimmyca15 @zhiyuanliang-ms , hope you all are doing good. We are kind of struck with above problem. As per your recommendation we clicked the checkbox "Require all above feature filter to be enabled" in Azure Portal but still we didn't get the requirement_type=All property in our CDN configuration and notice that it's shown in advanced edit view. We are calling the App configuration from Azure Functions, and CDN calls the Azure Function periodically and our App configuration client calls the CDN configuration from our WPF app client. This architecture was recommended by Microsoft during our initial discussion of using the Azure App configuration in million of our desktop clients. I have also attached the sample console application, with exact configuration and upgraded the nuget package FeatureManagement 4.0.0 and AzureAppConfiguration 8.0.0. I have also raised the azure support ticket for the same issue as well. |
Hi, @sathishkumarkaliavaradhan Sorry for the late response. So much info here. Let me digest them one by one.
It seems like we have a bug in this line @amerjusupovic @samsadsam Track in #632 Sorry for the inconvenience! Thank you for bring this out!!! This is a bad one. We will fix it as soon as possible. ---------------- Updated ----------------- |
Hi, @sathishkumarkaliavaradhan I modified your example application to make everything work. The major change I did:
You should get the following result when running the application: Here is the code: This is the feature flag I have in my App Configuration store. |
@sathishkumarkaliavaradhan BTW, if my understanding is correct, you are using Azure App Configuration as CDN, right? Will you really put a connection string of your App Configuration store in your client application? If this is true, please not do that. 1. put secret in client is not safe 2. Currently, App Config is not designed for edge delivery scenario, even if we have premium tier which will never give you throttling response. If you are not using premium tier, this is our quota: Our CDN solution is still work in progress. In about April or May, we will present our CDN solution which will be safe and reliable. |
Thank you so much @zhiyuanliang-ms . I really appreciate your help. We are not Azure App configuration as CDN instead App Configuration -> Azure function using the DefaultCrdentials -> Azure CDN which calls the Azure Function using function code -> App Configuration client calls Azure CDN endpoint to get the configuration using the CDN endpoint without authorization. we are not at all hardcoded the secrets in our client application. Edge delivery setup for Azure AppConfiguration (1).docx Edge delivery architecture provider by Microsoft because our case we have millions of desktop client for which App configuration doesn't support quota means 30,000 per hour is too less for our clients. It works fine, except the latest FF scenario of multiple condition with |
This sounds weird. Can you get the requirement_type from app config by using .NET provider locally or using it in Azure Function? |
Thanks @zhiyuanliang-ms for your response again. I suspect that in our Azure function, we are using the |
Hi, @sathishkumarkaliavaradhan
If that is the case, then it can explain why you cannot get Could you try to use the latest version of |
Hi All,
I would like to understand how the default percentage works? like within 1 hours if 10 calls made then 5 calls will get true and 5 calls get false?
I haven't set the seed and user groups only set the default percentage.
Thanks,
Sathishkumar
The text was updated successfully, but these errors were encountered: