Skip to content

feat: Turn on rbac check caching #6202

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

Merged
merged 6 commits into from
Feb 15, 2023
Merged

feat: Turn on rbac check caching #6202

merged 6 commits into from
Feb 15, 2023

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented Feb 14, 2023

What this does

This caches duplicate rbac checks within the same request context. Without authz_experiment enabled, this cache is unlikely to get hit.

Added a benchmark to test the performance impact, which is near 0. Note in prod the worse case size will be <20.

cpu: Intel(R) Core(TM) i7-6770HQ CPU @ 2.60GHz
BenchmarkCacher/Size1-8                  4239475               285.6 ns/op
BenchmarkCacher/Size10-8                 2740790               377.8 ns/op
BenchmarkCacher/Size100-8                 795837              1589 ns/op

@Emyrk Emyrk requested a review from johnstcn February 14, 2023 15:50
@johnstcn johnstcn self-assigned this Feb 14, 2023
@johnstcn
Copy link
Member

@Emyrk need to merge latest main

@Emyrk Emyrk merged commit 4cbbd13 into main Feb 15, 2023
@Emyrk Emyrk deleted the stevenmasley/cache_rbac_checks branch February 15, 2023 14:56
@github-actions github-actions bot locked and limited conversation to collaborators Feb 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants