-
-
Notifications
You must be signed in to change notification settings - Fork 832
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
Document connection pool limiting. #787
Comments
👎 on Tl;DR: |
Fair comment. How do we feel about a simpler alternative of We should possible also be dropping the tuple-style on Other places where we use this style:
|
Ah! I hadn't seen that go through. If that's the case, then I suppose a two-tuple isn't the worst... Especially for consistency :-p |
My preference is for objects over tuples as well. If for compatibility reasons it's important to use a tuple, there's always I do like that they're immutable though, I can't quite make sense of mutating timeouts dynamically -- The lexicographic ordering of tuples also seems complicated in this case? There might be a risk of someone doing Trio has an interesting conversation going on about soft and hard cancellation. |
Closed via #942 |
We're not currently documenting our connection pool limiting, in the "Advanced" section of our docs.
Also we're currently only supporting the explicit configuration style of
limits = httpx.PoolLimits(soft_limit=<int>, hard_limit=<int>)
.We may well want to support more concise styles too,
limits = <int>
andlimits = (int, int)
, which would be in line with the allowable styles our other config typing options.We'll want to include how the pool timeout ties in too.
Behaviour to document is:
None
to always allow. (Default 10)None
for no limits. (Default 100)And in the timeout section:
pool_timeout
- Timeout period for connection acquiry from the pool, orNone
. (Default 5s)I think we may also want to make some minor tweaks eg...
limit
is specified as a single int then set the keep-alive limit to half that number.The text was updated successfully, but these errors were encountered: