-
Notifications
You must be signed in to change notification settings - Fork 8k
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: add local token cache for cluster #3381
base: 1.8
Are you sure you want to change the base?
Conversation
liwen.2022 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Change-Id: I6b1ece200cd6b2db181f570ab7207325f12fc12b
086b3a8
to
109c3b4
Compare
Change-Id: I110062ea817430e8e52779d5c86804f5a476e13f
Change-Id: I86e004d9af1a70011dc9efd630735e4ee9b495e6
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 1.8 #3381 +/- ##
============================================
+ Coverage 45.89% 46.36% +0.46%
- Complexity 2145 2181 +36
============================================
Files 431 431
Lines 12903 13039 +136
Branches 1727 1749 +22
============================================
+ Hits 5922 6045 +123
- Misses 6279 6284 +5
- Partials 702 710 +8
☔ View full report in Codecov by Sentry. |
Change-Id: Ic2b76270fc868a451ddb06045c4e1321e71d12ec
Change-Id: Id9ed6e813a389fa494fc63bae4ec882d873a0fe3
Change-Id: I6b1ece200cd6b2db181f570ab7207325f12fc12b
Describe what this PR does / why we need it
By default, the cluster limiter will have to request to token server for each request. This will increase the latency and make
too much requests to the token server. In order to solve the performance issue under cluster, the local token cache should be a proposal for this.
Does this pull request fix one issue?
fix #3382
Describe how you did it
In order to reduce the request to server, we add a background prefetch job to period check the tokens and prefetch a batch of tokens if necessary. While the user request coming it will first check the local tokens.
Describe how to verify it
the test case is added to verify it.
Special notes for reviews