---
title: "What is proxy concurrency?"
url: https://proxy.wiki/glossary/concurrency/
type: Glossary Term
author: "proxy.wiki editorial"
published: 2026-08-19
updated: 2026-10-21
site: proxy.wiki
topics: ["Web scraping"]
license: CC BY 4.0; quote freely with attribution to https://proxy.wiki/
---

# What is proxy concurrency?

> How many requests or connections run at the same time. Often the limit you hit before bandwidth, and the setting that decides when a target pushes back.

Throughput is set by two numbers, not one. Little’s law, from queueing theory, says the average number of jobs in a stable system equals their arrival rate times the average time each one spends inside. Rearranged for a scraper, responses per second equal concurrency divided by average response time. A worked example with assumed numbers: 20 workers waiting half a second per response top out at 40 responses a second, and halving the latency doubles that with the same 20 workers. That is arithmetic, not a measurement, and it is why a cheap plan with a low concurrency cap can finish later than an expensive one at the same price per gigabyte.

## Three ceilings, and the lowest one wins

Your effective concurrency is the smallest of three limits: what your client library allows, what your proxy plan allows, and what the target tolerates before it pushes back. The first is the one people forget, because it is set before you write a line of configuration.

| Client | Default limit | What happens past it |
| --- | --- | --- |
| httpx | max_connections 100, of which 20 kept alive | Requests wait for a free connection, then raise PoolTimeout if none frees up in time |
| aiohttp TCPConnector | limit 100 in total, limit_per_host 0, meaning no per-host cap | Requests wait for a free connection |
| requests HTTPAdapter | pool_maxsize 10, pool_block False | Extra connections are opened and thrown away after use; urllib3 logs “Connection pool is full, discarding connection” |
| Node.js http.Agent | maxSockets Infinity per origin | Nothing stops you |
| curl --parallel | --parallel-max 50 | Further transfers wait |

The requests row matters more through a proxy than direct. Every discarded connection is a new tunnel, and on a [rotating](/glossary/rotating-proxy/) gateway the exit is chosen when a [CONNECT](/glossary/http-connect/) tunnel opens, so a kept-alive connection keeps its exit for every request it carries while a fresh one may land somewhere else. Twenty threads on a pool of ten do not just cost handshakes. They change how often your address changes.

## Set the ceiling in your own code

Relying on the provider to enforce the limit means discovering it through failures. Choose the number yourself. This version uses only the Python standard library, so it runs as written; we ran it on Python 3.15.0 through a local test proxy, where it printed `Counter({'200': 40})`.

```
import sys
import urllib.request
from collections import Counter
from concurrent.futures import ThreadPoolExecutor

PROXY = sys.argv[1] if len(sys.argv) > 1 else "http://user:pass@gw.example.net:8000"
CEILING = 8                      # your number, not the plan's maximum

opener = urllib.request.build_opener(
    urllib.request.ProxyHandler({"http": PROXY, "https": PROXY}))

def fetch(url: str) -> str:
    try:
        with opener.open(url, timeout=30) as r:
            return str(r.status)
    except urllib.error.HTTPError as e:
        return str(e.code)
    except Exception as e:
        return type(e).__name__

urls = ["https://example.com/"] * 40
with ThreadPoolExecutor(max_workers=CEILING) as pool:
    print(Counter(pool.map(fetch, urls)))
```

Counting outcomes rather than printing them is deliberate. When the ceiling is too high, the counter is where it shows first.

## Finding the right number

Raise the ceiling in steps and watch the [success rate](/glossary/success-rate/), measured on content rather than status codes, not the throughput. Throughput keeps climbing for a while after results start to degrade, because blocked responses are fast. The right setting is the highest one at which the success rate has not yet fallen.

When it does fall, the symptom tells you which ceiling you hit. A plan limit shows up as connections refused or queued at the gateway. A target’s [rate limiter](/glossary/rate-limiting/) answers 429, which RFC 6585 says may carry a `Retry-After` header telling you how long to wait. A bot defence answers with [challenges](/glossary/captcha/) or 403s and no explanation. And your own machine runs out of sockets or memory, producing timeouts that look exactly like remote blocking. Rule that one out first, because it costs nothing to check.

The [Python proxy guide](/guides/proxies-in-python-requests-httpx/) covers connection reuse and retries in requests, httpx and aiohttp, the [Node.js guide](/guides/proxies-in-nodejs/) shows how reusing one agent decides how many tunnels you open, and the [403 vs 407 vs 429 guide](/guides/403-vs-407-vs-429/) covers backing off from a 429 without every worker retrying at the same moment.

## Frequently asked questions

### How many concurrent requests should I use?

The highest number at which your measured success rate has not started to fall. Raise it in steps and judge by content-validated results, not speed, because throughput keeps rising for a while after quality begins to drop.

### Does a plan's concurrency limit count connections or requests?

It depends on the provider, so ask. With keep-alive one connection carries many requests in sequence, and HTTP/2 can multiplex several at once, so the same job can count very differently under the two definitions.

## Sources

1. [Little, J. D. C. (1961). A Proof for the Queuing Formula: L = λW. Operations Research 9(3)](https://doi.org/10.1287/opre.9.3.383)
2. [HTTPX documentation: resource limits and their defaults](https://www.python-httpx.org/advanced/resource-limits/)
3. [HTTPX documentation: the pool timeout and PoolTimeout](https://www.python-httpx.org/advanced/timeouts/)
4. [aiohttp client reference: TCPConnector limit and limit_per_host](https://docs.aiohttp.org/en/stable/client_reference.html)
5. [Requests API: HTTPAdapter pool_connections, pool_maxsize, pool_block](https://requests.readthedocs.io/en/latest/api/)
6. [urllib3 source: the 'Connection pool is full, discarding connection' warning](https://github.com/urllib3/urllib3/blob/main/src/urllib3/connectionpool.py)
7. [Node.js documentation: http.Agent maxSockets](https://nodejs.org/api/http.html)
8. [curl manual: --parallel and --parallel-max](https://curl.se/docs/manpage.html)
9. [RFC 6585: status 429 Too Many Requests and Retry-After](https://www.rfc-editor.org/rfc/rfc6585.html)
