How Rotating Proxies Work

A rotating proxy hands you a fresh IP without you managing lists. Here is what happens behind the gateway and how to use it well.

12 min read

With a static proxy you receive a list of IPs and decide when to use each one. A rotating proxy moves that decision to the provider: your client connects to one gateway address and the provider chooses the exit IP from a large pool.

Rotation modes

  • Per request: every connection leaves from a different address — best for stateless fetching.
  • Sticky session: the same address is kept for a period or session ID — best for logins and multi-step flows.
  • On demand: you trigger a change yourself, for example with an IP-change link on a mobile proxy.

Where the pool comes from

Residential pools use household connections, mobile pools use SIM cards on carrier networks. Pool size, geographic spread and quality determine how often you receive an address that a target has not already flagged.

What can go wrong

  • Session breaks: a cookie issued to one IP may be rejected when the next request arrives from another. Use sticky sessions for stateful flows.
  • Inconsistent fingerprints: changing IP while keeping the same browser fingerprint can look odd for some sites.
  • Unclear timing: providers describe rotation intervals differently; verify the real behavior with an IP-echo endpoint before building on it.

Testing rotation yourself

Send ten requests through the gateway to an IP-echo service and record the addresses. Count unique IPs and watch how often they change. The proxy checker and IP address checker on this site are suited to this kind of test.

Proxy toolsIP Address CheckerSee the public IP address the server sees for your connection, whether it is IPv4 or IPv6, and which proxy-related headers your request carries.Explore

Choosing between mobile and residential rotation

Mobile pools carry the highest trust but are slower and metered. Residential pools are broader and available with unlimited-traffic plans by time. Pick the one whose trade-off matches your workload.

Inside the gateway: what happens to one request

Most rotating plans are built on a backconnect gateway: one hostname and port that you configure once, in front of a large pool of exit nodes. Your client authenticates to the gateway, the gateway picks an exit node according to the session settings attached to your credentials, and it relays your connection to the destination. The website sees only the exit node’s address. Because the address you dial never changes, your code needs no IP list, but rotation now happens on the provider’s side of the wire, where the only evidence you get is what the destination reports back.

Two consequences matter in practice. First, in most gateway designs the exit is chosen when a new connection is opened, not for every byte. An HTTPS request through an HTTP proxy is a single CONNECT tunnel, so every request your client sends down that tunnel, including follow-up requests to the same host over a kept-alive connection, leaves from the same exit IP even on a “rotating” plan. Second, a retry that reuses the connection will not change address, so “retry on a new IP” has to mean “retry on a new connection”.

Sticky sessions: labels, lifetimes and silent changes

A sticky session is usually a mapping from a session label to an exit node for a limited lifetime. How the label is passed (inside the username, as a separate port, or through a panel setting) differs between services, so never copy a format from another provider. For BuyProxy, residential plans list both rotating and sticky sessions, but the exact label format and the maximum sticky duration are not published on this site; ask sales on WhatsApp before you build a workflow on them.

Treat any sticky duration as a ceiling, never as a promise. On a residential pool the exit is a household connection that can go offline at any moment, and a mobile exit can change when the SIM reconnects. When that happens the gateway assigns another node and your session carries on from a different address. Design the client so that an unexpected address change is survivable:

  • Keep workflow state (cookies, tokens, pagination cursors) in your own storage, keyed by task, instead of relying on the IP staying the same.
  • Fetch the exit IP once at the start of a multi-step flow, and again whenever a login challenge or session error appears, so you can tell a node change from a genuine rejection.
  • Make flows restartable from the last safe step rather than from the beginning.
  • Give each concurrent worker its own session label; sharing one label between workers interleaves their traffic on one exit and breaks any per-IP rate budget.

Measure rotation behavior with a script

The ten-request test in the article above tells you whether addresses change. The script below also shows why they sometimes do not, by comparing fresh connections with a reused one. Run it against the gateway with your own credentials; it calls an IP-echo endpoint, so every reply is the exit address the website would see.

Python
import collections
import requests

GATEWAY = "http://USER:PASS@GATEWAY_HOST:PORT"
PROXIES = {"http": GATEWAY, "https": GATEWAY}
ECHO = "https://api.ipify.org"

def sample(n, reuse):
    seen = []
    session = requests.Session() if reuse else None
    for _ in range(n):
        get = session.get if reuse else requests.get
        seen.append(get(ECHO, proxies=PROXIES, timeout=20).text.strip())
    return seen

for reuse in (False, True):
    ips = sample(20, reuse)
    print("reused connection:", reuse, "| unique:", len(set(ips)), "of", len(ips))
    print(collections.Counter(ips).most_common(3))

Read the two result lines together. If the fresh-connection run shows mostly unique addresses and the session run shows one or two, rotation is per connection and your HTTP library’s connection pooling is hiding it. If both runs show a small set of repeating addresses, the pool available to your plan or targeting is narrow. Some repetition is normal: with an effective pool of 1,000 addresses (an illustrative figure), the chance of at least one repeat in 20 draws is about 1 − e^(−190/1000), roughly 17 percent, because 20 draws contain 190 pairs. Judge rotation by the unique-address ratio over hundreds of requests, not by one sample.

Matching rotation to the workload

Choose the rotation mode from what the server remembers between your requests, not from habit. The more state a server ties to an address, the less you should rotate.

  • Stateless public pages (listings, search results, public JSON): a fresh connection per request, no session label, and tolerance for the occasional duplicate address.
  • Paginated crawls with a server-side cursor: one sticky session for the whole walk, released when the walk ends.
  • Login, cart or checkout flows whose cookies are bound to an address: a sticky session for the entire flow, or a static ISP or mobile IP if the account must keep one address for days.
  • Long-lived connections such as WebSockets or streaming: a sticky session plus reconnect logic, because a rotation in the middle of a stream drops the connection.
  • Checking one page from several countries: request a different country target for each run instead of reusing a session, and record which country each result came from.

Metered pools: counting the cost of rotation

Rotation and billing interact. Residential GB plans (5, 10, 50, 100, 200 and 300 GB) carry a 30-day usage period, rotating mobile packs of 5, 10 and 100 GB are one-time purchases, and unlimited rotating mobile is billed monthly; unlimited rotating residential comes in daily, weekly and monthly periods. On any metered plan every retry spends data, including the small block pages you throw away.

A worked example with illustrative numbers: 100,000 page fetches at an average of 250 KB each come to 25 GB. If 15 percent of the fetches need one full-size retry, the total is about 28.75 GB, so a 50 GB plan covers the run while a 10 GB plan would be exhausted roughly a third of the way through. Track bytes per successful record rather than bytes per request, and compare that figure after every change to headers, resource blocking or retry policy.

Frequently asked questions

Why did I receive the same IP address twice in a row?

Pools return duplicates, and a reused connection keeps its exit, so both are normal. Compare a fresh-connection run with a session run using the script above, and judge the unique-address ratio over hundreds of requests. A narrow country or city target shrinks the usable pool, which makes repeats more frequent.

Is there a limit on parallel connections to the gateway?

Concurrency limits for each plan are not published on this site, so ask sales on WhatsApp before sizing a large job. In practice, raise concurrency in steps and watch the error codes and timeouts at each step; the proxy checker reports codes such as auth, refused and timeout. Stop raising concurrency when errors grow faster than throughput.

When is a static list better than a rotating gateway?

Choose a static list when you need an address that stays attributable over days, when you want to reproduce a result from a known IP, or when your cost model is per address rather than per GB. Choose a rotating gateway for high-volume, stateless jobs spread across many sites or locations. Many projects use both: static IPs for accounts and a rotating pool for public data.

Not sure which plan fits?

Describe your use case and target countries and we will recommend a product — or tell you honestly when another type suits you better.