Concurrency: Managing Simultaneous Proxy Connections

Concurrency refers to the number of simultaneous connections your software makes through a proxy gateway at the same moment. It is a key factor in determining the speed and efficiency of data collection tasks like web scraping or price monitoring. Understanding and managing concurrency helps you gather data faster while respecting the limits of both your proxy service and the target websites.

In short
  • Concurrency is the number of simultaneous connections, not the total requests per second.
  • Each open connection consumes a portion of your account's concurrency limit.
  • High concurrency speeds up tasks but can trigger rate limits or bans if mismanaged.
  • Our gateway supports HTTP, HTTPS, and SOCKS5 on ports 7070 and 7071 for concurrent use.

What is concurrency in proxy terms?

In the context of using a proxy service, concurrency is the number of TCP connections that are open and actively transmitting data through the proxy gateway at the same instant. When you run a script that opens 50 connections to gw.rotatingproxy.cc:7070 to fetch web pages in parallel, your concurrency is 50. It is a measure of parallel activity, not sequential speed. This concept is central to efficient data gathering, as seen in rank tracking or market research, where checking many data points quickly is valuable.

How does concurrency work with a rotating proxy gateway?

Our service operates as a single gateway host (gw.rotatingproxy.cc) with two ports: 7070 for HTTP/HTTPS and 7071 for SOCKS5. When your application opens a connection to this gateway, it is authenticated using a username and password (e.g., USERNAME_net.res_cc.us and PASSWORD). Each of these open connections counts toward your account's concurrency total. The gateway manages the routing of these concurrent connections to different exit IPs from the selected network (residential, mobile, datacenter, or ISP). This setup is detailed in our proxy pool vs gateway guide.

What is the concurrency limit for an account?

Each RotatingProxy account has a limit of 1,000 concurrent connections. This is a shared limit across all proxy users and networks under that account. For example, if you have a script using a residential proxy user with 800 concurrent connections and another script using a mobile proxy user with 250 connections, the total of 1,050 would exceed the limit, and new connection attempts would fail until some existing connections close. You can monitor your usage patterns in the dashboard to inform your concurrency planning.

How does concurrency relate to scraping speed and efficiency?

Higher concurrency generally allows you to collect data more quickly because you are performing more work in parallel. Instead of waiting for one request to finish before starting the next, you can have dozens or hundreds of requests in flight simultaneously. This is crucial for time-sensitive tasks like travel fare aggregation or financial data collection. However, speed is not unlimited. Each connection consumes bandwidth, which is measured and billed per GB, and excessive concurrency directed at a single website can lead to rate limiting or IP blocks. Our guide on avoiding blocks covers this balance.

What are common misunderstandings about concurrency?

A frequent misunderstanding is equating concurrency with requests per second (RPS). You can have a high RPS with low concurrency if each connection is reused efficiently (with HTTP keep-alive) and processes requests very quickly. Conversely, high concurrency with slow target site responses may yield a low RPS. Another misconception is that concurrency limits are per IP address; they are per account, shared across all exit IPs. Users also sometimes confuse the gateway's connection limit with the number of threads or processes in their code, which are related but distinct concepts. For more on technical setup, see aiohttp proxy or axios proxy integrations.

How should I plan my project's concurrency needs?

Start by estimating how many target URLs you need to access within a given time window. Then, consider the average response time of those target sites. A simple formula is: concurrency ≈ (total URLs * avg response time in seconds) / desired completion time in seconds. You must then adjust this for politeness; hammering a site like Amazon or Google Search with hundreds of concurrent connections from a single location is likely to trigger defenses. It's often better to distribute concurrency across different target sites, use sticky sessions to maintain consistent IPs for related requests, and implement delays. Our rate limiting guide provides practical strategies.

How does concurrency interact with other proxy features?

Concurrency works in tandem with features like IP rotation and session stickiness. If you use a username without a session ID (e.g., USERNAME_net.mob_cc.de), each new connection gets a new IP, and your concurrency will be spread across many different mobile IPs. If you use a sticky session (USERNAME_sid.abc123_ttl.30), multiple concurrent connections using the same session ID will all exit from the same IP for the session's duration. This is useful for tasks like social media management where maintaining a login session is necessary. The choice of network also affects performance; datacenter proxies often handle high concurrency with lower latency, while residential proxies are better for avoiding detection on sensitive targets, as compared in residential vs datacenter rotating proxies.

Questions

Does each concurrent connection use a different IP address?

Not necessarily. Without a session ID, each new connection typically gets a new IP. With a sticky session (using the sid option), all concurrent connections that share the same session ID will use the same exit IP for the duration of the session.

What happens if I exceed the 1,000 concurrent connection limit?

New connection attempts to the gateway will fail until some existing connections are closed. Your software will likely see a connection refused or timeout error. It's important to design your crawler to stay under this limit, as covered in our concurrency limit help page.

How is concurrency different from the number of threads in my Python script?

Threads are a programming construct for parallel execution. Concurrency is the actual number of live network connections. One thread can manage multiple connections (as in async programming), and multiple threads could share a single connection, though that's less common. For managing many connections efficiently, see httpx proxy or aiohttp proxy.

Can I increase my concurrency limit?

The limit is fixed per account at 1,000 concurrent connections. For most scraping and data collection tasks, this is sufficient. If you have a unique need requiring more, you would need to operate multiple accounts, which involves separate balances and management.

Do idle connections count toward the concurrency limit?

Yes, any open TCP connection to the gateway host and port counts toward the limit, regardless of whether data is actively flowing. It's good practice to close connections promptly after use. Libraries like Python's requests with a Session object can reuse connections efficiently via keep-alive.

How does concurrency affect my bandwidth usage and billing?

Concurrency itself doesn't directly affect billing; you are billed for the total GB of traffic uploaded and downloaded. However, higher concurrency typically allows you to consume bandwidth faster, as more data can flow in parallel. You can estimate costs using our traffic calculator and learn about how billing works.

Start with one top-up, use any network

Create an account in a minute, add $40 or more, and the same balance pays for residential, mobile, datacenter and ISP traffic.