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

[Feature] [Rate Limit] Add rate limter at client side #520

Open
fangxlmr opened this issue Nov 18, 2022 · 4 comments
Open

[Feature] [Rate Limit] Add rate limter at client side #520

fangxlmr opened this issue Nov 18, 2022 · 4 comments
Labels

Comments

@fangxlmr
Copy link

We already have rate limit interceptor at server side after #134. I'm considering to have one at client side to protect target service if server, since server may have no rate limit at all.

@rahulkhairwar
Copy link
Contributor

I understand where you're coming from, but using an interceptor or not at the client side - will entirely be a decision by the client. So, if a client doesn't choose to add the rate limiter interceptor, the server is not protected anyway!
Or, do you suggest enforcing the client to have this interceptor somehow?

@bwplotka
Copy link
Collaborator

Well there is a point in this. If you don't have control over backend, there is no way you can add rate limit there. Thus you might want to rate limit on your side e.g to reduce potential cost.

Fair proposal. Help wanted, we would accept it against v2 branch.

@bwplotka bwplotka added the v2 label Mar 19, 2023
@rahulkhairwar
Copy link
Contributor

I see.. that makes sense.
I can make the changes!

@rahulkhairwar
Copy link
Contributor

rahulkhairwar commented Mar 22, 2023

Hi @bwplotka , here's a PR with the changes, against the v2 branch.

Cheers!

rahulkhairwar added a commit to rahulkhairwar/go-grpc-middleware that referenced this issue Mar 22, 2023
rahulkhairwar added a commit to rahulkhairwar/go-grpc-middleware that referenced this issue Mar 22, 2023
rahulkhairwar added a commit to rahulkhairwar/go-grpc-middleware that referenced this issue Mar 22, 2023
rahulkhairwar added a commit to rahulkhairwar/go-grpc-middleware that referenced this issue Mar 26, 2023
rahulkhairwar added a commit to rahulkhairwar/go-grpc-middleware that referenced this issue Jul 4, 2023
rahulkhairwar added a commit to rahulkhairwar/go-grpc-middleware that referenced this issue Jul 4, 2023
rahulkhairwar added a commit to rahulkhairwar/go-grpc-middleware that referenced this issue Jul 6, 2023
rahulkhairwar added a commit to rahulkhairwar/go-grpc-middleware that referenced this issue Jul 6, 2023
johanbrandhorst pushed a commit that referenced this issue Jul 7, 2023
* Add unary and streaming client-side rate-limit interceptors (#520)

* Replace interface{} with any in ratelimit_test.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants