Slide 1

Slide 1 text

OpenFeature The Future of Feature Flags

Slide 2

Slide 2 text

● ● Software Engineer & Dev Advocate at Dynatrace ● Writing code & talking about writing code ● I attended a sewing course once Who Am I?

Slide 3

Slide 3 text

To Do List

Slide 4

Slide 4 text

To Do List v2

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

Canary ● Testing in production ● Can be lower cost ● Quickly catch on to any issues

Slide 23

Slide 23 text

Choosing who gets what

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

“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

Slide 26

Slide 26 text

To Do List + Clear Completed Feature

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

The ENV_VAR swamp 0 Dynamic configuration 1 Dynamic evaluation 2 Operationalized feature-flags 3 FEATURE FLAG MATURITY MODEL

Slide 29

Slide 29 text

Dynamic Evaluation ● Feature flag value is determined dynamically ● Based on contextual information ● Flag evaluation logic is centralized ● Flag evaluation logic is independent of application

Slide 30

Slide 30 text

Dynamic Evaluation ● No more if customer in legacyCustomers ● Reduced blast radius ● Experimentation that doesn’t require developer intervention ● Compliance agility

Slide 31

Slide 31 text

Feature Flag Architecture

Slide 32

Slide 32 text

“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

Slide 33

Slide 33 text

Feature Flag Architecture

Slide 34

Slide 34 text

Dynamic Evaluation: evaluation context

Slide 35

Slide 35 text

Dynamic Evaluation: implicit evaluation context

Slide 36

Slide 36 text

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?

Slide 37

Slide 37 text

Dynamic Evaluation: How do we use the data?

Slide 38

Slide 38 text

Dynamic Evaluation: How do we use the data?

Slide 39

Slide 39 text

Dynamic Evaluation: How do we use the data?

Slide 40

Slide 40 text

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

Slide 41

Slide 41 text

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

Slide 42

Slide 42 text

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

Slide 43

Slide 43 text

The ENV_VAR swamp 0 Dynamic configuration 1 Dynamic evaluation 2 Operationalized feature-flags 3 FEATURE FLAG MATURITY MODEL

Slide 44

Slide 44 text

A collection of APIs and SDKs used to collect telemetry data in a vendor agnostic way.

Slide 45

Slide 45 text

Basic Telemetry Types Traces Events (Logs) Metrics

Slide 46

Slide 46 text

Events (Logs) ● A point in time without duration ● Allow for arbitrary data and data types ● Logs are a particular type of event

Slide 47

Slide 47 text

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

Slide 48

Slide 48 text

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

Slide 49

Slide 49 text

Sneaker shop architecture

Slide 50

Slide 50 text

Scenario Response times are reasonable

Slide 51

Slide 51 text

Scenario As load increases…. response time become worse.

Slide 52

Slide 52 text

Drilling into a trace The database is the culprit.

Slide 53

Slide 53 text

The DB is the bottleneck

Slide 54

Slide 54 text

Let’s add read replicas

Slide 55

Slide 55 text

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

Slide 56

Slide 56 text

Adding the feature flag Identifies the feature flag Controls the database connection Evaluation context

Slide 57

Slide 57 text

Collect telemetry Monitors flag evaluations with OpenTelemetry events

Slide 58

Slide 58 text

Enabling feature Matching flag key Enabling for 25% of sessions

Slide 59

Slide 59 text

Starting the rollout Uh no! That shouldn’t happen.

Slide 60

Slide 60 text

That was close… Back to normal.

Slide 61

Slide 61 text

Failure rate by flag variant It only failed when the read replica was enabled. It only failed when the read replica was enabled.

Slide 62

Slide 62 text

Aggregate error messages Something is wrong with node 3

Slide 63

Slide 63 text

Let’s try that again…

Slide 64

Slide 64 text

Phase: Read replica disabled

Slide 65

Slide 65 text

Phase: Read replica enabled for 25%

Slide 66

Slide 66 text

Phase: Read replica enabled for 50%

Slide 67

Slide 67 text

Phase: Read replica enabled for 75%

Slide 68

Slide 68 text

Phase: Read replica enabled

Slide 69

Slide 69 text

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

Slide 70

Slide 70 text

Thanks! Questions?