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

Include rate limiting documentation #87

Open
20k-ultra opened this issue Mar 2, 2024 · 2 comments
Open

Include rate limiting documentation #87

20k-ultra opened this issue Mar 2, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@20k-ultra
Copy link

What is the problem your feature solves, or the need it fulfills?

I am interested to use Pingora but without digging through source code I am unsure if it can rate limit various metrics as I hope. I want to enforce limits such as:

  • RPS per downstream connection
  • RPS per upstream host (basically a sum of downstream RPS)
  • Total downstream connections for a given upstream host
  • Total downstream connections for an IP

Describe the solution you'd like

I would like to know when and what I can rate limit. I've read the life of a request so understand there are several points I can hook into. I was just hoping the pingora-limits crate would help me out and have some examples or documentation without having to read the source.

Describe alternatives you've considered

Reading source code.

@20k-ultra
Copy link
Author

if anyone knowledge-able with the source that knows the answer, I'd appreciate some input. I can figure out examples if it is possible. Will try to give it a look later.

@andrewhavck andrewhavck added the documentation Improvements or additions to documentation label Mar 4, 2024
@xialeistudio
Copy link

@20k-ultra I have submmited a PR to demonstrate how to use RateLimiter, which uses the request header-based dimension, you can implement your dimension by yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants