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

Use Polly for rate-limiting the HttpClient #851

Closed
dlidstrom opened this issue May 4, 2021 · 2 comments
Closed

Use Polly for rate-limiting the HttpClient #851

dlidstrom opened this issue May 4, 2021 · 2 comments

Comments

@dlidstrom
Copy link

Summary: What are you wanting to achieve?

I am a new user of Polly and I've successfully used a few of the policies (timeout, circuitbreaker, retry). Now, I have a need to try to rate limit on the client end, and I'd like to fit this in with the policies I have in place. Is there a way to rate limit on the client end?

What code or approach do you have so far?

My approach has been to used a custom DelegatingHandler, as such: https://github.com/dlidstrom/Snittlistan/blob/master/Snittlistan.Web/Infrastructure/RateHandler.cs
I can continue that approach but first I'd like to know if this can be handled within Polly?

@martincostello
Copy link
Member

Rate limiting is not currently supported.

There is an open draft Pull Request #666 to add it in a future version.

@dlidstrom
Copy link
Author

Thanks @martincostello !

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

No branches or pull requests

2 participants