Unleash as a configuration service provider? #3224
Replies: 5 comments 4 replies
-
Hi, @samuelneff 👋🏼 Great question! As you've identified: using variants, you should be able to add any data that you can represent as a string. And yes, custom context fields should let you target any user group you want. For clarity: were you thinking of using different variants for one feature, and target the users with custom fields for the variant rollout? Unleash's strategy constraints would allow you to target users very well on the strategy-level, but the same control isn't yet available on the variant-level. However, this is something we are looking into and will likely support in the future.
I don't think I've heard much about people using it for this purpose, so I don't have any experiences to share, but there are some limitations you should be aware of at least. First: Unleash is focused on availability over consistency. So if you have a very distributed setup, such as multiple Edge or proxy instances, then you could get different results between different instances while any changes from the Unleash server propagates to the Edge/proxy instances. If you have only one Edge/proxy instance, then that won't be an issue, but there can be a small delay during which the changes propagate from the Unleash server to that instance. If you only connect directly to the Unleash instance itself, then that shouldn't be an issue, though. Also, depending on the kind of configuration you're after, Unleash may be more or less suited. Oftentimes, configuration values will be pretty static: you read them on startup and then they can't change until you restart the app. Unleash is best suited for dynamic configuration values that can change during runtime. However, most of our SDKs can block execution until they have synced with the server, and most also support reading a configuration from a file, so there's certainly ways around that. So it comes down to that classic software answer: it depends. Depending on your applications and your general setup, it may be more or less suited. Of course, we'd be happy to try and help you out and provide suggestions if you want to share more about how you're planning to use it and your systems Hope that helps 😄 |
Beta Was this translation helpful? Give feedback.
-
Thanks for that. All spot on. We spent several days working through a single specific example using variants and then using strategies. It appeared to work well at first but in both situations we ran into problems with more complex usages where Unleash would return the wrong variant or would return multiple strategies when only one was desired. I have a huge write-up including two sets of 14-16 steps to repro/demo with per-step screenshots and notes. I can share later on after sanitizing company info if you're interested. Very brief example of what does not work: Scenario: Given a desired configuration value Variant setup. Not actual values but same scenarios.
|
Beta Was this translation helpful? Give feedback.
-
Thanks for the detailed response. I'll share the full write-up as soon as I can sanitize it. Unleash is not doing anything wrong. Unleash is behaving exactly as it's designed and documented. Our use-case and desired response is inconsistent with the intended behavior of Unleash. Unleash is not really the right product for our use case, but since we are using it for feature flags throughout our organization (8,000+ people), our hope was it could serve this need as well. We would like to find a workaround, but as of right now I don't see one that doesn't involve moving a lot of the functionality and logic we are looking for to custom code wrapped around what Unleash provides. We'll likely look to other options that do not include Unleash for this use case. Perhaps it is something that can be supported in the future if there is interest from others. Thanks for all the attention and responses. |
Beta Was this translation helpful? Give feedback.
-
Maybe this is wishful thinking... it looks like this is actually controlled client-side and would be a one-word change in the Java SDK? private static Optional<VariantDefinition> getOverride(
List<VariantDefinition> variants, UnleashContext context) {
return variants.stream()
.filter(
variant ->
variant.getOverrides().stream()
.anyMatch(overrideMatchesContext(context))) // Add support for optional allMatch here?
.findFirst();
} We wouldn't be selecting server side if a variant is "match any" vs "match all" but would do it in client instead, which could make it inconsistent if different clients use it differently, but does what we're looking for. Right? |
Beta Was this translation helpful? Give feedback.
-
Great. I created a feature request for yggdrasil: Unleash/yggdrasil#32. |
Beta Was this translation helpful? Give feedback.
-
We're using Unleash for feature flags throughout our company and some are looking to use it as a full configuration management solution. For this we need not only boolean flags but other scalar data types, strings, numbers, dates. It seems we might be able to use variants for this and target specific groups of users by a variety of custom fields.
Examples of configuration are timeouts that can vary by client organization, dates that can vary by specific site (within the context of a client), or numeric thresholds based on user role (across clients).
Can anyone share experiences using Unleash in this way? Any concerns we should watch out for?
Thanks,
Sam
Beta Was this translation helpful? Give feedback.
All reactions