Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added
connection_pool_size
configuration property (preview) (#276)
We have three things that are configurable from `requests` connection pooling perspective: * `pool_connections` - Number of urllib3 connection pools to cache before discarding the least recently used pool. Python requests default value is 10. This PR increases it to 20. * `pool_maxsize` - The maximum number of connections to save in the pool. Improves performance in multithreaded situations. For now, we're setting it to the same value as connection_pool_size. * `pool_block` - If pool_block is False, then more connections will are created, but not saved after the first use. Block when no free connections are available. urllib3 ensures that no more than pool_maxsize connections are used at a time. Prevents platform from flooding. By default, requests library doesn't block. We start with blocking. This PR introduces two new configuration properties: - `connection_pool_size` configuration property, which sets `pool_connections`. Defaults to 20. - `connection_pool_max_size`, which sets `pool_maxsize`. Defaults to the same value as `connection_pool_size`.
- Loading branch information