Skip to content

docs: first draft multi-synch-sources ADR #1636

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

djosephsen
Copy link
Contributor

Intent of this PR is to add the first draft of the multi-synch-sources ADR, this is a docs-only change

Signed-off-by: Dave Josephsen <dave.josephsen@gmail.com>
@djosephsen djosephsen requested review from a team as code owners June 2, 2025 15:01
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jun 2, 2025
Copy link

netlify bot commented Jun 2, 2025

Deploy Preview for polite-licorice-3db33c ready!

Name Link
🔨 Latest commit fa01785
🔍 Latest deploy log https://app.netlify.com/projects/polite-licorice-3db33c/deploys/6849b405f8bb6500088b347c
😎 Deploy Preview https://deploy-preview-1636--polite-licorice-3db33c.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.


Flagd daemon is a feature flag evaluation engine that forms a core part of the OpenFeature ecosystem. Unlike OpenFeature SDK components, which are, by design, agnostic to the specifics of flag structure, evaluation, and persistence, Flagd must take an opinionated stance about how feature-flags look, feel, and act. What schema best describes a flag? How should they be evaluated? And in what sort of persistence layer should they be stored?

This latter-most question -- _how should they be stored_ -- is the most opaque design detail of every commercial flagging product from the perspective its end-users. As a front-line engineer using a commercial flagging product, I may, for example, be exposed to flag schema by the product's SDK, and become familiar with its evaluation intricacies over time as my needs grow to require advanced features, or as I encounter surprising behavior. Rarely, however, is an end-user exposed to the details of a commercial product's storage backend. The SaaS vendor is expected to engineer a safe, fast, multi-tenant storage back-end, optimized for its flag schema and operational parameters, and insulate the customer from these details via its SDK. This presents Flagd, an open-source evaluation engine, with an interesting conundrum: what sort of flag storage best suits the needs of its potential user-base (which is everyone)?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good thing to mention.

<!--
Unsure whether we want a diagram in this section or not. Happy to add one if we want one.
-->
The solution to the conundrum posited in the background section of this document is to decouple flag storage entirely from the rest of the runtime, including instead support for myriad commonly used data synchronization interfaces. This allows Flagd to be agnostic to flag storage, while enabling users to use whichever storage back-end best suits their environment.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be good to add something to drive the point home here, in terms of syncs essentially being "resources" in the "URI" sense of the term... any flag configuration that you could locate as a URI is possibly a reasonable sync type (http:, file:, grpc:, ftp:, etc, etc, etc).

Comment on lines +36 to +38
<!--
Unsure whether we want a diagram in this section or not. Happy to add one if we want one.
-->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed IMO, but wouldn't hurt 🤷

@toddbaert toddbaert self-requested a review June 5, 2025 17:59
Copy link
Member

@toddbaert toddbaert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm basically ready to approve this with the exception of some structural and grammatical changes. Really nice doc, thanks @djosephsen

@toddbaert
Copy link
Member

@djosephsen running make markdownlint-fix and committing the result should fix the CI issue.


The goal of first-class multi-sync support generally is to broaden Flagd's potential to suit the needs of many different types of engineers, operating in many different contexts. By decoupling flag persistence from the runtime, Flagd can focus on evaluation and sync, while enabling its user-base to choose a persistence layer that best suits their individual requirements.

## Background
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying to understand more of the background - is this a backfill ADR?
It also confuses me a bit as I don't see the connection between storage and multi sync sources - is the concern around the data consistency?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is another "retrospective/historical" ADR, the one @djosephsen volunteered to do at our last meeting. It's explaining our multi-sync support, documented here: https://flagd.dev/reference/sync-configuration/ (basically explaining why we created this interface and why we want to support fetching flags from various resources).

<!--
Unsure whether we want a diagram in this section or not. Happy to add one if we want one.
-->
The solution to the conundrum posited in the background section of this document is to decouple flag storage entirely from the rest of the runtime, including instead support for myriad commonly used data synchronization interfaces. This allows Flagd to be agnostic to flag storage, while enabling users to use whichever storage back-end best suits their environment.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What the interface of the storage you have in mind when coming up with this proposal? The existing implementation or there's another new proposal?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a backfill ADR for the existing ISync interface.

updated: 2025-05-21
---

# ADR: Multiple Sync Sources
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I still don't get the high-level idea after reading the ADR - are we trying to change something for config syncing or flag (and other data) storage of flagd?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No changes are intended, this ADR is an attempt to explain the rationale for the existing ISync interface, and the project's support for multiple sync-sources.

djosephsen and others added 5 commits June 11, 2025 11:49
Co-authored-by: Todd Baert <todd.baert@dynatrace.com>
Signed-off-by: Dave Josephsen <dave.josephsen@gmail.com>
Co-authored-by: Todd Baert <todd.baert@dynatrace.com>
Signed-off-by: Dave Josephsen <dave.josephsen@gmail.com>
Co-authored-by: Todd Baert <todd.baert@dynatrace.com>
Signed-off-by: Dave Josephsen <dave.josephsen@gmail.com>
Co-authored-by: Todd Baert <todd.baert@dynatrace.com>
Signed-off-by: Dave Josephsen <dave.josephsen@gmail.com>
Co-authored-by: Todd Baert <todd.baert@dynatrace.com>
Signed-off-by: Dave Josephsen <dave.josephsen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants