Proxy Basics

Rotating Proxies Explained: How Proxy Rotation Works

Rotating proxies change your IP automatically, per request or per session. Learn how rotation works, when to rotate, how it differs from static proxies, and how to set it up.

By Team of Monkeys Editorial Updated 6 min read Affiliate disclosure

This guide contains affiliate links to Geonode, Webshare and Rayobyte. If you buy through them we may earn a commission, at no extra cost to you.

Rotating proxies explained: a scraper's requests pass through a proxy rotation gateway that assigns a new IP address from the pool 3jdej38j4

What is proxy rotation?

Proxy rotation means automatically switching the IP address your requests come from. Instead of sending every request through one IP, which quickly hits rate limits and blocks, you spread requests across many IPs. A rotating proxy service does this for you behind a single endpoint.

How rotating, sticky and static IPs differ, and which session type suits scraping, logins and checkouts. Video: Decodo (formerly Smartproxy) on YouTube

Rotation is the reason large-scale web scraping is possible. A website that allows 100 requests per IP per hour lets you make 100,000 requests per hour if you rotate across 1,000 IPs, as long as each IP stays within the limit.

Two ways to rotate

Provider-side rotation (backconnect)

You connect to one gateway address. The provider picks a new exit IP for each request or session from its pool. You don't manage IP lists at all. This is how rotating residential proxies work, and it's increasingly common for datacenter pools too. See backconnect proxies.

Client-side rotation

You have a list of static proxies, and your code chooses which to use for each request: round-robin, random, or smarter strategies based on success rates. This is common with dedicated datacenter and ISP proxies. See proxy rotation strategies.

Rotating proxies, visualised (animated GIF) 3jdej38j4
Rotating proxies, visualised. GIF via Tenor

Rotation modes

ModeWhat happensGood for
Per requestEvery request gets a new IPStateless scraping of many independent pages
Sticky session (time-based)Same IP for N minutes, then rotatesMulti-step flows, browsing sessions
Sticky session (until failure)Same IP until it errorsLong-running tasks
Manual / on demandIP changes when you call an API or change session IDMobile proxies, controlled workflows
StaticIP never changesAccounts, whitelisting, sneakers
A Python tutorial on rotating proxies for web requests, showing a simple rotation loop you can adapt. Video: NeuralNine on YouTube

For a deep dive into choosing between modes, see sticky vs rotating sessions.

When rotation helps

  • Scraping thousands of product, search or listing pages.
  • Avoiding per-IP rate limits.
  • Gathering geo-distributed data, such as prices across many cities.
  • Sneaker raffle entries, where each entry needs a unique IP.

When rotation hurts

  • Logged-in sessions. An account that jumps between IPs in different cities every request looks hijacked.
  • Checkouts and multi-step forms. Cart and session cookies may be bound to an IP.
  • Pages protected by challenge cookies. Bot protection often issues a cookie tied to the IP that solved the challenge. Rotate and you need to solve it again.
  • WebSocket or streaming connections that need a stable endpoint.

Proxy tip: A practical next step is to run a few requests through a commercial pool and watch what changes. Geonode supports HTTP, HTTPS and SOCKS5 and lets you switch between rotating and sticky sessions from the same endpoint. We walk through it in our Geonode proxies guide.

Rotation isn't invisibility

Rotating IPs prevents IP-based rate limits, but sophisticated sites track much more: browser fingerprints, cookies, TLS signatures and behaviour. If 10,000 requests come from 10,000 IPs but have the same unusual fingerprint and perfect regular timing, they'll still be grouped. Combine rotation with realistic headers, varied timing and good fingerprints. See avoiding IP bans when scraping.

How to set up rotation

With a rotating gateway, rotation is usually as simple as not specifying a session:

python
import requests
proxy = "http://USER:PASS@gate.example.com:7777"  # new IP per request
for _ in range(3):
    print(requests.get("https://api.ipify.org", proxies={"https": proxy}).text)

To hold an IP, add a session ID per the provider's syntax. With a list of static proxies, rotate in code:

python
import itertools, requests
proxies = ["http://u:p@1.2.3.4:8080", "http://u:p@5.6.7.8:8080"]
for proxy in itertools.islice(itertools.cycle(proxies), 6):
    print(requests.get("https://api.ipify.org", proxies={"https": proxy}).text)

For browsers, see Puppeteer rotating proxies.

Rotation in different tools

ToolHow to rotate
Python requestsNew proxy dict or session ID per request. See Python requests proxies
ScrapySet request.meta['proxy'] per request or use a rotating middleware. See Scrapy proxies
Node.jsNew proxy agent per session. See Node.js proxies
PuppeteerNew browser context per session. See Puppeteer rotating proxies
PlaywrightNew context with a new proxy per session. See Playwright proxies
Sneaker botsOne proxy line per task; residential lines carry their own session IDs

How many IPs do you actually rotate through?

With a rotating residential gateway, you don't choose the number; the provider draws from whatever's online that matches your targeting. With a static list, the number is your list size. Either way, the question is whether the effective pool is big enough to keep each IP under the target's limits. See proxy pool size.

A quick way to check with a gateway: send 500 requests with per-request rotation and count unique IPs. If you see heavy repetition, your targeting may be too narrow or the pool thin in that region.

Budget tip: For jobs where a fixed IP list is enough, Webshare is one of the cheapest options: shared datacenter proxies are sold by the IP, and static residential (ISP) proxies cost well under a dollar per IP per month at the time of writing. More in Webshare rotating residential proxies.

Rotation and cost

Rotation itself rarely costs extra, but it interacts with pricing:

  • Per-GB plans: rotation is free, but each new connection has TLS overhead; very small requests can carry noticeable overhead.
  • Per-IP plans: you pay for the size of the list you rotate through.
  • Per-port plans: concurrency, not rotation, is the limit.

See proxy bandwidth pricing explained.

A rotation checklist

  1. Decide the session unit (request, page flow, account).
  2. Choose provider-side or client-side rotation.
  3. Detect blocks and rotate on failure, not blindly.
  4. Rotate fingerprints with IPs where relevant, but keep them consistent within a session.
  5. Throttle per domain regardless of rotation. See rate limiting and proxies.

Residential tip: If you want to try this on an ethically sourced residential pool, Rayobyte offers a free trial with no credit card, then pay-as-you-go traffic from $3.50 per GB that drops to $0.70 per GB at 1 TB. See Rayobyte Premium Residential proxies.

Why your IP sometimes doesn't rotate

A common surprise: you point a loop at a per-request rotating gateway and see the same IP several times in a row. The gateway is usually fine. Connection reuse is the cause.

For HTTPS traffic, the exit is chosen when the CONNECT tunnel opens, and every request sent inside that tunnel uses it. HTTP clients keep connections open and reuse them for speed:

  • requests.Session() in Python and Node.js agents with keepAlive: true reuse connections;
  • browsers hold connections open per host for a while;
  • HTTP/2 sends many requests over one connection.

Every request riding the same connection leaves from the same exit IP. What to do depends on what you want:

  1. A new IP for every request: disable keep-alive, open a fresh connection each time, or add a new session ID per request so the gateway treats it as a new session.
  2. A stable IP for a while: use a sticky session ID rather than relying on keep-alive, which can break without warning.
  3. Not sure what's happening: log the exit IP from an echo service such as api.ipify.org next to each request, then look at the pattern.

The language-specific details are in Python requests proxies and Node.js proxies. For the session side of the question, see sticky vs rotating sessions.

Rotation is built into most residential and datacenter products, so compare providers on pool quality and targeting rather than rotation alone. Our best proxies guide shows how.

If you're deciding between Webshare and Geonode here, see Webshare vs Geonode Rotation for a side-by-side look at products, pricing and setup.

If you're weighing Rayobyte as well, Rayobyte Premium Residential Proxies explains which of its products fits, and Rayobyte vs Geonode vs Webshare IP Rotation puts it side by side with Geonode and Webshare.

FAQ

Are rotating proxies better than static proxies?

For scraping many pages, yes. For accounts and long sessions, static is better.

How often should I rotate?

As often as needed to stay under the target's rate limits, but never mid-session. A common default is per request for stateless pages and 5 to 30 minutes for browser sessions.

Do rotating proxies cost more?

Rotating residential proxies are usually sold per GB. Rotating datacenter proxies can be cheap. See proxy pricing guide.

Sources and further reading

Independent references that back up the points above, from standards bodies, governments, universities and non-profits. They open in a new tab.

Affiliate disclosure: Team of Monkeys is an affiliate of Geonode, Webshare and Rayobyte. Links and banners marked as sponsored, and links to Geonode, Webshare and Rayobyte in the text, use our referral links, and we may earn a commission if you buy through them, at no extra cost to you. Our explanations and comparisons are written to be useful whichever provider you choose.

Editorial note: Proxy providers change their pools, features and prices often, so treat any figures here as typical ranges at the time of writing and confirm current terms with the provider before you buy.