• Data analytics
  • Proxy infrastructure

Proxy pool size vs concurrent threads: scraping math

5 min read
Proxy Pool Size vs Concurrent Threads: Scraping Math thumbnail
AI-generated illustration

Learn the mathematical relationship between proxy pool size, concurrent scraping threads, and target rate limits to maximize your extraction throughput.

Table of contents

Most developers hit a wall when scaling data collection. They increase the number of concurrent scraping threads, expecting a linear jump in successful requests. Instead, the success rate drops, latency spikes, and target servers return connection resets. Throughput is a strictly mathematical relationship between proxy pool size, target rate limits, and proxy concurrency.

The baseline equation for scraping throughput

The naive approach to scraping capacity looks exclusively at the client side. If your objective is to extract 10,000 pages per minute, and the average request latency is two seconds, you calculate your required concurrent scraping threads using a simple division.

Throughput equals concurrent threads divided by average latency.

To achieve 166 requests per second with a two-second latency, you need roughly 333 concurrent threads. You configure your workers, initialize the processes, and immediately burn your IP addresses.

This baseline calculation assumes your proxies can handle infinite requests. In reality, target websites track request density per IP address. Sending multiple simultaneous requests from the same IP, or hitting the server too frequently, triggers bot protection mechanisms. Your client-side math is technically correct, but your network-side execution fails.

Introducing the IP cooldown multiplier

Sustaining high throughput without getting banned means adding the target server IP cooldown requirement to your calculations. The cooldown interval is the minimum time an IP must rest between consecutive requests to remain unflagged.

That requirement shifts the capacity planning from client-side concurrency to network-side proxy pool size. The formula for the minimum required pool size calculates the required concurrent active connections and multiplies them by the cooldown interval.

Assume you run 333 concurrent threads with a two-second latency. The target site requires a 60-second cooldown per IP to remain undetected.

Required Pool = (333 / 2) * 60
Required Pool = 166.5 * 60
Required Pool = 9,990

You need a minimum of 9,990 unique, active IPs at any given moment to sustain this specific operation safely. If your pool contains only 5,000 IPs, your rotation logic will reuse IPs before their 60-second cooldown expires. This causes a cascading failure loop. Target servers ban the exhausted IPs, your effective pool size shrinks further, the rotation speeds up, and ban rates accelerate exponentially.

The risks of unmanaged proxy concurrency

When concurrent scraping threads outscale the proxy pool size, the immediate symptom is IP collision. Two or more threads end up routing requests through the same IP at the exact same time.

Strict bot detection systems monitor connection multiplexing. If a single IP opens multiple TCP connections to fetch HTML pages simultaneously, it signals automated behavior. Target servers will typically respond with HTTP 429 Too Many Requests, drop the connection entirely, or serve a CAPTCHA challenge.

Overloading the proxy gateways is the other risk. Standard rotation logic operates on an assignment basis. If the demand for new IPs exceeds the available supply in a fixed shared datacenter proxy pool, the gateway assigns the least-recently-used IP. If the cooldown threshold is ignored, the request is doomed before it even leaves the gateway.

Datacenter vs residential pool constraints

Mathematical models behave differently depending on the underlying proxy infrastructure you deploy.

Datacenter pools are static and highly predictable. If you purchase 10,000 IPs, you have exactly 10,000 IPs available for your concurrency calculations. You can rely on stable latency figures and absolute pool limits. The math maps cleanly to reality.

Residential networks change constantly. Devices connect and disconnect from the network continuously. When a provider advertises a pool of 10 million IPs, that represents the total monthly rotation. The number of IPs online at the precise moment you execute your script is a fraction of that total.

Sizing proxy concurrency for real residential proxies requires a safety margin for offline nodes and fluctuating latency. If your mathematical baseline requires 10,000 active IPs, you need access to a much larger aggregate pool to ensure 10,000 routing options actually exist in your target geolocation at runtime.

Three variables raise your safe yield

Throwing more concurrent threads at a throughput bottleneck is counterproductive. You have three variables you can actually manipulate to increase your safe yield.

  • Reduce average latency. Optimize your code to drop unnecessary assets. Use lightweight HTTP clients instead of headless browsers where possible. Locate your scraping servers geographically closer to the target server. Halving your latency doubles your throughput for the exact same pool size.
  • Reduce the required cooldown. You achieve this by mimicking human behavior more closely. Randomizing user agents, managing cookies properly, and matching TLS fingerprints can trick the target into relaxing its rate limits. This allows more frequent requests per IP.
  • Increase the proxy pool size. Expanding the number of available IPs gives your rotation logic the breathing room it needs. This allows you to respect strict cooldown rules without idling your worker threads.

Moving from theory to production architecture

Translating this math into code requires a strict decoupling of your scraping workers from your proxy rotation logic. Your scraping application should not dictate which IP it uses.

An optimal architecture relies on a centralized request queue. Worker threads pull jobs from the queue and forward them to an intelligent proxy gateway. The gateway maintains state on the proxy pool size, tracks the timestamp of the last request for each IP, and enforces the cooldown rules mathematically.

Suppose a worker requests an IP for a specific target domain and no IPs have cleared the cooldown phase. The gateway should then pause the request rather than serve a hot IP. This logic prevents burned proxies and maintains a high success rate at the cost of temporary latency.

For massive enterprise workloads, relying on shared routing logic introduces too much variance. Companies often bypass shared pools entirely and build a custom proxy infrastructure to guarantee exact concurrency limits and dedicated IP availability. This isolates your operations from the noise of other users and gives you absolute control over the rotation math.

Measure latency and status codes to size your threads

Scaling throughput depends on your threads, latency, cooldown rules, and available IPs being in perfect balance. Miscalculate the relationship, and you waste computing power while burning valuable network resources. Build your architecture to measure request latency and track HTTP status codes, then use these metrics to adjust your concurrent scraping threads up or down based on current pool availability.

If you need help sizing the right proxy stack for your use case, talk to our team.

Custom proxy solutions

Proxies tailored to your use case

Our team designs custom proxy infrastructure for B2B data teams scraping at scale. Residential, datacenter, ISP, and mobile pools with SLA, GDPR-ready sourcing, and dedicated account management.

Talk to our team
Need proxies tailored to your use case?