Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[FR] Allow poolsize and maxpool size settings for http client

Open
#648 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python

Research direction

Start at the HttpClient constructor shown in the issue and inspect how its requests.Session mounts HTTPAdapter instances for both schemes. Trace the existing retry, timeout, and session setup, then verify that configurable pool settings are applied consistently to HTTP and HTTPS requests and that the client behavior remains unchanged by default.

Written by the indexing model from the issue text.

Description

api: core type: feature request

Is your feature request related to a problem? Please describe.
I am currently facing a performance issue in which the default max pool size of requests library has become a bottleneck.

Describe the solution you'd like
A clear and concise description of what you want to happen.
I was wondering if we could increase the pool size by taking them as parameters for message client constructor
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context


class HttpClient:
    def __init__(
            self, credential=None, session=None, base_url='', headers=None,
            retries=DEFAULT_RETRY_CONFIG, timeout=DEFAULT_TIMEOUT_SECONDS,
            pool_connections=DEFAULT_POOL_CONNECTIONS, pool_maxsize=DEFAULT_MAX_POOL_SIZE
        ):
        if credential:
            self._session = transport.requests.AuthorizedSession(credential)
        elif session:
            self._session = session
        else:
            self._session = requests.Session() # pylint: disable=redefined-variable-type

        if headers:
            self._session.headers.update(headers)
        if retries:
            self._session.mount('http://', requests.adapters.HTTPAdapter(max_retries=retries))
            self._session.mount('https://', requests.adapters.HTTPAdapter(max_retries=retries))
        
        self._session.mount('http://', requests.adapters.HTTPAdapter(pool_connections=pool_connections, pool_maxsize=pool_maxsize))
         self._session.mount('https://', requests.adapters.HTTPAdapter(pool_connections=pool_connections, pool_maxsize=pool_maxsize))
        
        self._base_url = base_url
        self._timeout = timeout
Dominant language
Python
Stars
1.2k
Forks
359
Avg merge
3d 9h
Merged PRs (30d)
3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from firebase/firebase-admin-python

All issues in firebase/firebase-admin-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.