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

Improve the performance and latency for the cluster limiter #3382

Open
absolute8511 opened this issue Apr 23, 2024 · 0 comments · May be fixed by #3381
Open

Improve the performance and latency for the cluster limiter #3382

absolute8511 opened this issue Apr 23, 2024 · 0 comments · May be fixed by #3381

Comments

@absolute8511
Copy link

absolute8511 commented Apr 23, 2024

Issue Description

Type: feature request

Describe what feature you want

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.

Describe your initial design (if present)

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.

Some design summary as below:

  • only small request will be cached to reduce the pressure to the token server
  • we allow request more than cached in some cases, and if prefetch failed for a while, most should be fall back to local limiter.

Additional context

@absolute8511 absolute8511 linked a pull request Apr 23, 2024 that will close this issue
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 a pull request may close this issue.

1 participant