Skip to content

Comments

Rate limiting#50

Open
lovelydinosaur wants to merge 3 commits intodevfrom
rate-limiting
Open

Rate limiting#50
lovelydinosaur wants to merge 3 commits intodevfrom
rate-limiting

Conversation

@lovelydinosaur
Copy link
Contributor

Let's have an approach similar to our timeouts to enforce network rate limiting.

Design questions here include "what specifiers should we support" and "what is the API for specifying upload vs. download rates"?

with httpx.rate("10MB/s"):
    ...
with httpx.rate_limit(upload="10MB/s", download="25MB/s"):
    ...

There's also potentially(?) implementation questions here around windowing and smoothing, tho a hard cap might be reasonable. What good prior art is there for us to reference here?

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 this pull request may close these issues.

1 participant