Skip to content
Back to Blog

Guides

Rotating Proxies: The Complete Guide for 2026

ZentisLabs Team13 min read

Rotating proxies automatically assign a new IP address for each request (or at configurable intervals). They're the backbone of web scraping, data collection, and any operation that needs to distribute traffic across thousands of IPs.

How Rotating Proxies Work

text
Your App → Proxy Gateway → IP Pool (100M+ IPs) → Target Website
↓
Request 1 → IP: 185.12.xx.xx
Request 2 → IP: 91.234.xx.xx
Request 3 → IP: 72.89.xx.xx
(new IP every time)

ZentisLabs gives you a pool of 100M+ residential IPs. When you send a request to basic.resi.zentislabs.com:12321, the gateway selects a fresh IP from the pool and routes your traffic through it.

Strategy 1: Per-Request Rotation

Every HTTP request gets a new IP. Best for scraping search results, collecting public data, and independent requests.

python
import requests
proxy = "http://USER:PASS@basic.resi.zentislabs.com:12321"
proxies = {"http": proxy, "https": proxy}
# Each request: different IP
for i in range(100):
r = requests.get("https://httpbin.org/ip", proxies=proxies)
print(r.json()["origin"]) # New IP every time

Strategy 2: Sticky Sessions

Same IP maintained for the session lifetime you set (Basic: _lifetime-30m). Best for multi-step workflows, shopping carts, and account operations.

python
# Sticky session - same IP for 30 minutes (_lifetime-30m). Use the sticky line
# exactly as generated in the dashboard or API: NODE_IP is its pinned gateway node.
proxy = "http://USER:PASS_country-us_session-order789_lifetime-30m@NODE_IP:12321"
proxies = {"http": proxy, "https": proxy}
session = requests.Session()
session.proxies = proxies
# All use the same IP
session.get("https://shop.com/")
session.get("https://shop.com/product/1")
session.post("https://shop.com/cart/add", data={"id": 1})

Strategy 3: Geo-Targeted Rotation

python
# Rotate within US IPs only
proxy_us = "http://USER:PASS_country-us@basic.resi.zentislabs.com:12321"
# Rotate within German IPs only
proxy_de = "http://USER:PASS_country-de@basic.resi.zentislabs.com:12321"
# Rotate within New York IPs only (the city follows its state)
proxy_nyc = "http://USER:PASS_country-us_state-newyork-city-newyork@basic.resi.zentislabs.com:12321"

Node.js Implementation

javascript
const axios = require('axios');
const { HttpsProxyAgent } = require('https-proxy-agent');
const agent = new HttpsProxyAgent('http://USER:PASS@basic.resi.zentislabs.com:12321');
async function scrape(urls) {
const results = [];
for (const url of urls) {
try {
const response = await axios.get(url, {
httpsAgent: agent,
proxy: false,
timeout: 15000,
headers: {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/122.0.0.0',
}
});
results.push({ url, status: response.status, data: response.data });
} catch (err) {
results.push({ url, error: err.message });
}
}
return results;
}

Rotation Timing: How to Avoid Bans

Target TypeStrategyDelay
Public APIsPer-request rotation0.5-1s
E-commerce sitesPer-request + headers1-3s
Social mediaSticky sessions2-5s
Cloudflare sitesSticky + browser3-8s
Search enginesGeo-targeted + random5-15s

The Golden Rules

  • Don't hit the same domain faster than a human would - 2-5 second delays are usually safe
  • Rotate User-Agents alongside IPs - a new IP with the same User-Agent is suspicious
  • Use sticky sessions for stateful operations - changing IPs mid-flow triggers security alerts
  • Respect robots.txt - it often reveals rate limit thresholds
  • Monitor success rates - if they drop below 95%, slow down

Success Rate Optimization

python
import requests
import time
import random
PROXY = "http://USER:PASS@basic.resi.zentislabs.com:12321"
proxies = {"http": PROXY, "https": PROXY}
def optimized_scrape(urls):
session = requests.Session()
session.proxies = proxies
user_agents = [
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/122.0.0.0 Safari/537.36",
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) Safari/605.1.15",
"Mozilla/5.0 (X11; Linux x86_64; rv:124.0) Firefox/124.0",
]
results = []
success = 0
for url in urls:
session.headers.update({
"User-Agent": random.choice(user_agents),
"Accept-Language": "en-US,en;q=0.9",
})
try:
r = session.get(url, timeout=15)
if r.status_code == 200:
success += 1
results.append(r.text)
elif r.status_code == 429:
time.sleep(10)
except Exception:
pass
time.sleep(random.uniform(1.5, 4.0))
print(f"Success rate: {success}/{len(urls)} ({100*success/len(urls):.1f}%)")
return results

Choosing a Proxy Type for Rotation

Proxy TypeRotationBest For
ResidentialPer-requestGeneral scraping, high stealth
ISP (Static)ManualAccount management, SEO
DatacenterPer-requestSpeed-focused, bulk ops
Mobile (4G/5G)Time-basedSocial media, max stealth

ZentisLabs bandwidth never expires - buy once, use whenever you want. No monthly resets. For most scraping tasks, residential rotating proxies offer the best balance of anonymity, success rate, and cost.

Ready to get started?

Try ZentisLabs free - 100MB residential bandwidth included.