Definition
HTTP connection pooling keeps reusable network connections so a client can send later requests without creating a new connection each time. It is separate from a pool of proxy addresses.
Why clients reuse connections
Establishing a connection can involve network round trips and, for HTTPS, TLS negotiation. Reuse can avoid repeating some setup work. HTTPX documents that its Client instance maintains a connection pool, while its top-level request functions do not reuse connections across separate calls in the same way.
For an illustrative sequence to the same host, a reusable client can send a later request over an eligible existing connection. Eligibility depends on the client, protocol, destination, and proxy configuration; it is not a promise that every request uses one socket forever.
How pooling interacts with proxies
If exit selection occurs when a proxy connection is established, retaining that connection can affect when a new selection happens. This is a conditional engineering consequence, not a universal rule that all proxy services rotate only on connections.
A website cookie session, a sticky proxy mapping, and a pooled transport connection are separate objects. A client can preserve cookies while reconnecting, or reuse a connection without implying a permanently fixed exit contract.
Limit and release resources
HTTPX exposes limits for total connections, retained keep-alive connections, and idle keep-alive expiry. Its pool timeout controls waiting to acquire a connection. A pool timeout can therefore indicate local contention rather than proof of an unreachable destination.
Close clients and response resources according to the library’s documented lifecycle. When comparing timing, report whether connections were cold or reused. Otherwise, setup-cost differences can be incorrectly attributed to proxy resource quality.
Sources
Sources checked on November 18, 2026. Examples are illustrative, not measurements of a live proxy service.
Related concepts
Frequently asked questions
Does pooling mean requests are cached?
No. Reusing a transport connection is different from storing and reusing response content.
Does one connection always carry only one request?
No. HTTP connection reuse can carry multiple requests over time; multiplexing depends on the protocol and implementation.
Can connection reuse affect observed rotation?
Yes, if the provider’s exit selection is tied to new connections. Confirm the provider’s trigger.
What does a pool timeout mean in HTTPX?
The client waited too long to acquire a connection from its pool.
Does a larger pool always improve results?
No. It can increase resource use and pressure on the service or target. Choose limits based on an authorized workload.