Proxy providers advertise pool size: millions of IPs, hundreds of millions. Pool size matters, but it hides a second question that matters just as much for reliability: how many different networks those addresses come from. A pool of ten million IPs on a handful of networks behaves very differently from one spread across thousands.
ASN diversity is how widely a proxy pool’s addresses are spread across different networks. Every IP address belongs to a network run by one organisation and identified by an autonomous system number (ASN). A diverse pool draws its exits from many networks, with no single one carrying an outsized share; a concentrated pool sits mostly on a few.
For residential proxies, the ASN is usually a consumer internet provider. This article explains why the spread of a pool across ASNs matters, how to measure it from a sample of exits with a free Python script, and how to read the numbers, using real figures from our own benchmark.
Why ASN diversity matters for proxy reliability
Websites and anti-bot systems rarely judge an IP address on its own. They judge it in context, and the network is one of the strongest pieces of context they have.
- Blocks spread by network. When a site sees abuse from many addresses on one network, it can rate-limit or challenge the whole network. A pool concentrated on a few ASNs is exposed to that: one network-level decision affects a large share of your traffic.
- Reputation is shared. Addresses on the same network inherit some of its reputation. A diverse pool is less affected when one network’s reputation drops.
- Hosting networks give the game away. A “residential” pool with a meaningful share of addresses on hosting or data-centre networks is not fully residential, and sites treat those addresses accordingly.
- Local realism needs local networks. If you collect data as seen from a country or city, the exits should be spread over the providers people there actually use.
This is also why targeting a specific network is useful for some jobs. Our guide to ASN targeting for residential proxies covers when to pin requests to one provider, which is the opposite case: deliberate concentration for a specific test.
What a diverse residential pool should look like
Real internet markets are concentrated. In most countries, a few large providers serve most households, with a long tail of smaller regional and mobile networks behind them. A healthy residential pool mirrors that shape: a few large consumer ISPs carrying a good share of exits, and many smaller networks behind them.
So the goal is not perfectly equal shares across networks. It is two things:
- No single network dominates beyond what that country’s internet market would explain.
- A long tail exists: many distinct networks, so that a block on any one of them affects only a small share of traffic.
How to measure ASN diversity in a proxy pool
You cannot see a provider’s whole pool, but you can sample it. Send requests through the rotating gateway, record which IP and network each request exits from, and compute concentration metrics over the sample.
Four metrics cover most of what matters:
| Metric | What it measures | How to read it |
|---|---|---|
| Distinct ASNs | How many networks appear in the sample | Higher is better; grows with sample size |
| Top-1 and top-5 share | The share of exits on the largest one and five networks | Lower means less exposure to one network’s decisions |
| Herfindahl-Hirschman index (HHI) | The sum of squared shares, from near 0 (spread out) to 1 (one network) | The standard measure of market concentration |
| Effective number of ASNs | 1 / HHI: how many equal-sized networks the sample behaves like | The most intuitive single number |
Add one more check that is not about concentration: the share of exits on non-residential networks. For a residential pool, that should be close to zero.
Save the module below as asn_diversity.py. It samples exits through a proxy using ip-info.com, our free IP geolocation API, which returns each address’s ASN, network name and whether it is a residential or hosting network, and computes the metrics:
# asn_diversity.py
from collections import Counter
import requests
def sample_exit(proxy_url, get=requests.get):
"""One exit through a rotating proxy: its IP, network (ASN) and network type."""
info = get("http://ip-info.com/json", proxies={"http": proxy_url, "https": proxy_url}, timeout=20).json()
return {"ip": info["ip"], "asn": info["asn"], "as_name": info["as_name"], "user_type": info.get("user_type")}
def diversity(exits):
"""How spread out a sample of exits is across networks."""
exits = list({e["ip"]: e for e in exits}.values()) # count each IP once
counts = Counter(e["asn"] for e in exits)
n = len(exits)
shares = sorted((c / n for c in counts.values()), reverse=True)
hhi = sum(s * s for s in shares) # Herfindahl-Hirschman index, 0 to 1
return {
"unique_ips": n,
"asns": len(counts),
"top1_share": round(shares[0], 3),
"top5_share": round(sum(shares[:5]), 3),
"hhi": round(hhi, 4),
"effective_asns": round(1 / hhi, 1), # as many equal-sized networks as this
"non_residential_share": round(sum(e["user_type"] != "residential" for e in exits) / n, 3),
}
Two illustrative samples of 1,000 exits show how differently a broad and a narrow pool read (synthetic data, not real providers):
import random
from asn_diversity import diversity
random.seed(7)
# Illustrative samples of 1,000 exits from two pools (synthetic, not real providers)
broad = [{"ip": f"ip{i}", "asn": random.choice(range(60)), "user_type": "residential"} for i in range(1000)]
narrow = [{"ip": f"ip{i}", "asn": random.choice([1, 1, 1, 1, 2, 2, 3, 4]), "user_type": "residential"}
for i in range(1000)]
print("broad ", diversity(broad))
print("narrow", diversity(narrow))
broad {'unique_ips': 1000, 'asns': 60, 'top1_share': 0.028, 'top5_share': 0.125, 'hhi': 0.0176, 'effective_asns': 57.0, 'non_residential_share': 0.0}
narrow {'unique_ips': 1000, 'asns': 4, 'top1_share': 0.506, 'top5_share': 1.0, 'hhi': 0.3466, 'effective_asns': 2.9, 'non_residential_share': 0.0}
The broad pool behaves like 57 equal-sized networks, and its largest network carries under 3% of exits. The narrow pool behaves like fewer than three: half of all exits sit on one network, and every exit is on one of four. On the narrow pool, a single network-level block on the largest ASN would stop half your requests.
Collecting 1,000 real exits through a gateway
To measure a real pool, point sample_exit at a rotating gateway and collect the sample in parallel. With Shifter, the country goes in the username and every request without a session ID gets a fresh exit:
from concurrent.futures import ThreadPoolExecutor
from asn_diversity import diversity, sample_exit
PROXY = "http://customer-USERNAME-country-gb:PASSWORD@p.shifter.io:443"
def safe_sample(_):
try:
return sample_exit(PROXY)
except Exception:
return None # skip the odd timeout
with ThreadPoolExecutor(max_workers=20) as pool:
exits = [e for e in pool.map(safe_sample, range(1000)) if e]
print(diversity(exits))
Run the same script, with the same sample size and at the same hour, against every provider you compare.
Subnet (/24) diversity
ASNs are not the only grouping that matters. Sites also block whole address blocks, most often the /24 subnet (the first three numbers of an IPv4 address). Two exits on the same /24 usually share a building, a street or a carrier-grade NAT, so a block on one often catches the other. Two lines added to the same sample count them:
subnets = Counter(".".join(e["ip"].split(".")[:3]) for e in exits)
print("distinct /24 subnets:", len(subnets), "largest subnet share:", round(max(subnets.values()) / len(exits), 3))
A healthy residential sample has nearly as many distinct /24 subnets as distinct IPs.
How to get a fair ASN sample
A few precautions keep the measurement honest:
- Sample per country. Diversity only means something within a market. Mixing countries inflates the ASN count without telling you anything about any one of them.
- Use enough requests. The number of distinct ASNs keeps growing with sample size, so compare pools at the same sample size. A thousand exits per country is a reasonable start; shares and HHI stabilise faster than the count.
- Count each IP once. Rotating pools can return the same address more than once. The module above deduplicates by IP.
- Spread the sample over time. Residential pools change through the day as devices come and go. Sampling over several hours gives a truer picture than one burst.
- Use the same lookup source for every pool. Different geolocation databases can attribute an address to slightly different networks.
What our benchmark found
We count distinct ASNs in every run of our residential proxy benchmark: Shifter and 16 other networks, each sent the same number of requests per country from the same server. These samples are far larger than 1,000 exits (250,000 requests in the United States, 60,000 to 100,000 elsewhere), so the counts are much higher than a small test would show, but they are comparable between providers.
In the United States, the five widest pools were:
| Network | Distinct US ASNs | Live US IPs |
|---|---|---|
| Shifter | 1,828 | 212,212 |
| Oxylabs | 1,591 | 140,811 |
| Decodo | 1,578 | 138,914 |
| Webshare | 1,518 | 150,512 |
| FleetProxy | 1,482 | 112,402 |
Across the five countries we test, Shifter compared with Webshare, the strongest competitor on pool size, like this:
| Country | Shifter ASNs | Webshare ASNs |
|---|---|---|
| United States | 1,828 | 1,518 |
| United Kingdom | 166 | 209 |
| France | 147 | 96 |
| Canada | 308 | 245 |
| Germany | 272 | 188 |
The United Kingdom is the one market where Webshare spread wider: 209 networks against 166, a gap of 43. In the same run Shifter returned more live UK addresses, 60,487 against 51,564, and the pool we tested costs from $0.75 per GB against Webshare’s lowest published rate of $1.40, a little over half the price. Shifter’s measured figures in Germany were the reverse of the UK: fewer live IPs than Webshare, but 272 networks against 188.
Using ASN data day to day
Once you can measure ASN spread, the same data helps in daily work, not only in vendor selection:
- Read failures by network. When block rates rise, group failed requests by the ASN of their exit. If the failures cluster on one or two networks, the target is acting against those networks, and spreading or excluding them fixes more than retrying does.
- Check a pool before a big job. A quick 1,000-exit sample in the target country tells you whether the pool there is broad enough for the volume you plan to send.
- Pin a network only when the job needs it. Some tests, such as checking what one provider’s customers see, call for concentration on purpose. ASN targeting does that; the guide linked above covers when it is worth it.
- Record the ASN with every result. When a number in a dataset looks wrong, knowing which network it was observed from is often the explanation.
ISP proxies and network spread
The same thinking applies to IPs you keep for longer. If you buy static residential proxies for long sessions, spreading them over several providers and cities avoids putting every identity on one network. Our guide to buying ISP proxies without wasting money includes a script for checking a batch of IPs, and our ISP proxies let you choose the city and ISP (ASN) for every IP, across 900+ ISPs in 1,800+ cities. How a provider sources its addresses also shapes diversity; our explainer on how providers ethically source residential IPs covers what to ask.
FAQ
What is ASN diversity in a proxy network?
How widely a proxy pool’s IP addresses are spread across different networks (autonomous systems). A diverse pool has many networks with no single one dominating; a concentrated pool has most addresses on a few.
Why does ASN diversity matter for scraping?
Sites often act against whole networks, not single addresses. If most of your exits share a network, one network-level block can affect a large share of your requests.
How do I measure ASN diversity?
Send a sample of requests through the proxy, record the ASN of each exit, and compute the share of the largest networks, the Herfindahl-Hirschman index and the effective number of networks. Sample per country, over time, and at the same size for each pool you compare.
Is a bigger proxy pool always more diverse?
No. A large pool can still be concentrated on a few networks. Pool size and network diversity are separate measurements.
What is a good effective number of ASNs?
There is no single target, because it depends on how concentrated the country’s internet market is. Compare providers in the same country at the same sample size: the pool with the higher effective number of ASNs and the lower top-network share is the more resilient one.
How many exits should I sample?
A thousand unique exits per country is a reasonable start. Shares, HHI and the effective number of ASNs settle quickly; the raw count of distinct ASNs keeps growing with sample size, so only compare counts taken at the same size.
What is subnet diversity, and how is it different from ASN diversity?
Subnet diversity counts how many distinct /24 address blocks a sample covers. ASN diversity is about networks; subnet diversity is about neighbourhoods inside a network. Sites block at both levels, so a good pool is broad on both.
Which provider had the widest ASN spread in your benchmark?
In the United States, Shifter reached 1,828 distinct networks, the highest of the 17 networks we measured, with Oxylabs next at 1,591. Shifter also reached the most networks in France and Canada and tied with Rayobyte for the most in Germany; in the United Kingdom Webshare reached more, 209 against 166.
The bottom line
IP counts measure a pool’s size; ASN diversity measures its resilience. Sample exits per country, count each IP once, and look at the effective number of networks, the top-network share, the subnet spread and the share of non-residential exits. A healthy residential pool mirrors the local internet market: a few large consumer ISPs and a long tail behind them, with no single network carrying an outsized share of your traffic.