Threads (concurrent connections)

Threads are the number of connections a program opens through a proxy at the same time.

Updated · Prokso editorial team

A scraper with 50 threads opens 50 connections at once and loads 50 pages in parallel. A browser also opens several connections per page: images, scripts, styles.

The more threads, the faster the work goes, but the greater the load on the site. If all threads go to one site, a rate limit will kick in quickly.

The number of threads and the request frequency are different things. You can have many threads and a low pace for each site by spreading requests across different sites. For large volumes of public data, rotation is used.

In Prokso up to 1000 concurrent connections are available per plan. Traffic is counted by volume, not by the number of threads.

How many threads to start with

Begin with 5-10 threads per site and watch the responses for a few minutes. If almost all of them are 200 and the response time stays flat, add threads in small steps. As soon as 429, 503 or timeouts appear, go back to the previous step and stay there.

What you seeWhat it meansWhat to do
stable 200, even response timethe site handles the paceyou can carefully add threads
429 or Retry-Afterthe site asks you to slow downcut threads, wait the stated time
more and more timeoutsthe site or your computer is overloadedcut threads, check CPU and memory

Threads and IP addresses in Prokso

On ports 823 and 824 every request gets a new IP, so 50 threads mean 50 different exit addresses at once. On a port from the 10000-20000 range all threads share one sticky IP for the holding time. If a task needs ten stable addresses at the same time, use ten different ports, one sticky session per port.

The limit of 1000 connections belongs to the plan, not to a program. If two scripts use the same plan username, they share this limit between them.

A connection is not the same as a request

With keep-alive one connection carries many requests in a row, so 20 threads can make thousands of requests without opening a new connection each time. Browsers limit connections too: Chrome opens up to 6 at once to one host over HTTP/1.1. Over HTTP/2 a browser usually sends all requests to a host through a single connection.

FAQ

How many threads should I set?

Start with a small number and increase it while the site's responses stay stable. Too many threads on one site quickly hit the limit.

Do threads affect the price?

No. You pay for traffic, not for the number of connections.

Residential $1.59, mobile $2.50, datacenter $0.65 per GB

Sign up in a minute, get access right after payment.

Create account