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

Deploying Flagr Architecture #139

Closed
oleborne opened this issue Jul 5, 2018 · 6 comments
Closed

Deploying Flagr Architecture #139

oleborne opened this issue Jul 5, 2018 · 6 comments

Comments

@oleborne
Copy link

oleborne commented Jul 5, 2018

Flagr Architecture references many components: UI, Flagr, Sync Worker, Evaluator, ...
https://checkr.github.io/flagr/#/flagr_overview?id=flagr-architecture

However, the doc about deployment and configuration is about a single docker image that seem to correspond to the Flagr Manager tier.

It is possible to deploy a scalable installation as the one described in this document?
Where can I find any documentation on how to do so?

Thanks

@zhouzhuojie
Copy link
Collaborator

The flagr image or flagr binary with static UI asset has everything you need to run, which includes "Flagr Manager" and "Flagr Evaluator". Analytics is not included here, since I can't assume everyone's data pipeline.

For scalable installation, you can deploy as many as flagr nodes as you want behind a load balancer, for example, Kubernetes' DNS, or nginx gateway.

Moreover, every node can serve the traffic for both evaluation and CRUD.
https://checkr.github.io/flagr/api_docs/#tag/evaluation => high QPS endpoints
https://checkr.github.io/flagr/api_docs/#tag/flag => CRUD endpoints

@oleborne
Copy link
Author

oleborne commented Jul 5, 2018

Brilliant!
Is Redis actually involved? Or are evaluators reading data directly from the DB?

Would you recommend deploying this image as a DaemonSet in K8s?

@zhouzhuojie
Copy link
Collaborator

Good catch! I originally planned to use Redis, but in production, directly read from the DB works for our scale without problems - it's a periodic read with eager loading, and most DB already has the cache for this use case, so I didn't implement the Redis cache yet, which also means one less dependency.

Will update the figure in the doc soon.

@oleborne
Copy link
Author

oleborne commented Jul 5, 2018

Thanks for the information.
I'm really eager to try using Flagr to introduce feature flags in our process.

Is it possible to share the scale you are able to serve with this approach?
No need to provide sensitive information, just round to closest power of 10 or even rougher (DB used, number of instances, flag and evaluation per day).

@zhouzhuojie
Copy link
Collaborator

Of course, here are some stats in our production

  • 5 nodes of flagr for HA
  • around 5000 per second for flagr evaluation
  • MySQL DB, reloading all flags into memory takes about 50ms

Definitely try it out and benchmark it on your end.

@oleborne
Copy link
Author

oleborne commented Jul 5, 2018

Thank you very much for your help and information.
I'll try to come back and share our experience in a couple month if this experimentation goes forward.

@oleborne oleborne closed this as completed Jul 5, 2018
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

No branches or pull requests

2 participants