Upgrade to Pro — share decks privately, control downloads, hide ads and more …

OpenFeature: The Future of Feature Flags

Yarden Laifenfeld
April 04, 2024
77

OpenFeature: The Future of Feature Flags

Yarden Laifenfeld

April 04, 2024
Tweet

Transcript

  1. • • Software Engineer & Dev Advocate at Dynatrace •

    Writing code & talking about writing code • I attended a sewing course once Who Am I?
  2. Canary • Testing in production • Can be lower cost

    • Quickly catch on to any issues
  3. “Feature flags are a software development technique that allows teams

    to enable, disable or change the behavior of certain features or code paths in a product or service, without modifying the source code.” - From the OpenFeature website
  4. The ENV_VAR swamp 0 Dynamic configuration 1 Dynamic evaluation 2

    Operationalized feature-flags 3 FEATURE FLAG MATURITY MODEL
  5. Dynamic Evaluation • Feature flag value is determined dynamically •

    Based on contextual information • Flag evaluation logic is centralized • Flag evaluation logic is independent of application
  6. Dynamic Evaluation • No more if customer in legacyCustomers •

    Reduced blast radius • Experimentation that doesn’t require developer intervention • Compliance agility
  7. “is an open specification that provides a vendor-agnostic, community-driven API

    for feature flagging that works with your favorite feature flag management tool or in-house solution.” - From the OpenFeature website
  8. OK, so we have the contextual data, but what do

    we do with it? Targeting: “The application of rules, specific user overrides, or fractional evaluations in feature flag resolution.” Dynamic Evaluation: How do we use the data?
  9. 1. flagd is OpenFeature’s cloud-native reference implementation of a feature-flag

    provider a. Written in Go b. Easily containerized c. Can source flags from various syncs (files, HTTP endpoints, Kubernetes CRDs) 2. Flags and targeting defined as JSON and a custom flag evaluation DSL build on JSONLogic Dynamic Evaluation: flagd
  10. Dynamic Evaluation: flagd 1. “enable-mainframe-access” flag is a simple boolean

    flag with true/false variants 2. By default, it returns false (“off” variant) 3. Has a targeting rule that returns “on” variant if email address supplied in context ends with “@ingen.com” 4. Let’s check it out in the playground
  11. In the context of feature flagging, dynamic evaluation means feature

    flags are evaluated during runtime, and use contextual data as the basis for their resolved flag values. Dynamic Evaluation
  12. The ENV_VAR swamp 0 Dynamic configuration 1 Dynamic evaluation 2

    Operationalized feature-flags 3 FEATURE FLAG MATURITY MODEL
  13. Events (Logs) • A point in time without duration •

    Allow for arbitrary data and data types • Logs are a particular type of event
  14. Traces • Collection of related spans ◦ Operation with a

    duration and timestamp • Arbitrary data stored as attributes • Spans linked together in a tree • Essentially 2 events - Start and End Time Spans
  15. Metrics • Numeric data aggregated from a series of events

    • Usually original events are dropped • Usually attributes are more restricted • Requires keeping state on the client • Possible to generate later from events or traces
  16. Here’s the plan Put access to the read replica behind

    a feature flag 1 2 3 4 5 Enable the read replica for a small number of users Analyze the impact Enable the read replica for everyone Remove the feature flag
  17. Failure rate by flag variant It only failed when the

    read replica was enabled. It only failed when the read replica was enabled.
  18. Recap Rolled out an important performance fix 1 2 3

    4 5 Controlled the impact of unforeseen problems Validated assumptions Rolled the new feature out for all users Continuously monitor impact