Skip to content
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

feat(storage): flipt to flipt replication #2475

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

GeorgeMac
Copy link
Contributor

@GeorgeMac GeorgeMac commented Dec 1, 2023

This is currently just a spike of the feature for our consideration.
Work needs to be done to add tests and so on.

This adds support for Flipt using another Flipt instance as a backend.
In this mode, the replica Flipt will build an in-memory snapshot in the same way the declarative backends work.
This allows you to run one tier of Flipt to handle writes and the frontend, while deploying a fleet of read-only Flipts who serve evaluations from memory. This would support Flipt as a sidecar with fewer extra dependencies.

To achieve this, a new internal snapshot streaming RPC is added to send full snapshots to clients when state changes.

Outstanding:

  • Unit tests
  • Integration tests
  • GRPC client TLS support
  • Polling interval config on the primaries
  • New configuration schemas

Copy link
Contributor

github-actions bot commented Dec 1, 2023

Uffizzi Ephemeral Environment deployment-42059

☁️ https://app.uffizzi.com/github.com/flipt-io/flipt/pull/2475

📄 View Application Logs etc.

⏰ This Preview will be destroyed in 1 hours at: Mon Dec 4 10:31:43 UTC 2023

What is Uffizzi? Learn more!

Copy link

codecov bot commented Dec 1, 2023

Codecov Report

Attention: 136 lines in your changes are missing coverage. Please review.

Comparison is base (40dff04) 70.73% compared to head (bb39fb7) 69.59%.
Report is 10 commits behind head on main.

Files Patch % Lines
internal/storage/fs/evaluation.go 0.00% 102 Missing ⚠️
internal/cmd/grpc.go 0.00% 21 Missing ⚠️
internal/config/storage.go 31.25% 11 Missing ⚠️
internal/storage/fs/snapshot.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2475      +/-   ##
==========================================
- Coverage   70.73%   69.59%   -1.14%     
==========================================
  Files          81       82       +1     
  Lines        8130     8263     +133     
==========================================
  Hits         5751     5751              
- Misses       2033     2166     +133     
  Partials      346      346              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@yquansah yquansah left a comment

Choose a reason for hiding this comment

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

This is looking great so far

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants