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

OpenFGA: Add request cache to the OpenFGA datastore #14557

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

Conversation

gabrielmougard
Copy link
Contributor

This PR decrease the latency of API calls that are going through the OpenFGA fine-grained authorizer. Thanks to a per-request cache mechanism, we avoid calling the database when the cache key is present.

This work has been benchmarked and has been used in the following PR: #14476

openfga_benchmark.pdf

The benchmarking script can be found at: https://paste.ubuntu.com/p/WCwsk6gSSK/

lxd/daemon.go Outdated Show resolved Hide resolved
Copy link
Contributor

@markylaing markylaing left a comment

Choose a reason for hiding this comment

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

General LGTM, just a couple of nits :)

@gabrielmougard
Copy link
Contributor Author

Thanks! Fixing this right away

@gabrielmougard gabrielmougard force-pushed the feat/openfga-request-cache branch 2 times, most recently from a4814ce to 9c61530 Compare December 2, 2024 08:50
@gabrielmougard
Copy link
Contributor Author

@tomponline @markylaing updated (thanks Mark for helping documenting this)

Copy link
Contributor

@markylaing markylaing left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

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.

2 participants