Sticky vs rotating proxies is a choice of address lifetime. Rotating proxies assign a new IP address on every request. Sticky proxies keep the same IP for a defined period. On ProxyLabs residential proxies that period is 10, 30, 60 or 120 minutes. Picking the wrong type doesn't just reduce efficiency — it can actively cause failures. A multi-step checkout flow with rotating IPs will break because the server sees different IPs mid-session. A bulk scraping job with sticky IPs will get flagged because 500 requests from one IP in 10 minutes is abnormal residential behavior.
Here's the decision framework based on real usage patterns.
Quick Decision Table
| Use case | Proxy type | Why |
|---|---|---|
| Scraping product pages (independent URLs) | Rotating | Each request is standalone, max IP diversity |
| Scraping search results (pagination) | Rotating | Pages are independent, no session state |
| Login → navigate → scrape | Sticky | Server tracks session by IP |
| Multi-step checkout flow | Sticky | IP change mid-checkout = instant flag |
| Account creation | Sticky | Registration flow spans multiple requests |
| Social media account management | Sticky | Platform ties session to IP |
| Price comparison across regions | Rotating + geo | Different IP per region, no session needed |
| SERP monitoring | Rotating + geo | Independent queries, max diversity |
| Ad verification | Rotating + geo | Need many IPs to see different ad variants |
| Sneaker/ticket purchasing | Sticky | Cart → checkout is stateful |
How Rotating Proxies Work
With a gateway proxy, rotation happens automatically. Each new TCP connection through the gateway gets assigned a different exit IP from the pool.
import requests
# Each request gets a new IP — no session ID in the username
proxy = {
'http': 'http://your-username:[email protected]:8080',
'https': 'http://your-username:[email protected]:8080',
}
for i in range(5):
r = requests.get('https://httpbin.org/ip', proxies=proxy)
print(f"Request {i+1}: {r.json()['origin']}")
# Each new connection can exit on a different address.
When Rotating Proxies Excel
Bulk data collection: Scraping product pages where each URL is an independent request. A new connection can leave from a different address, so one blocked address affects that request.
Search engine scraping: Each search query is standalone. A rotating residential request can take a different address each time, which keeps a single address from carrying the whole job.
Data verification: Checking prices, stock levels, or content from many different IPs to verify you're seeing the same data that real users see (some sites serve different content to repeated visitors).
Rotating Proxy Pitfalls
Session-dependent pages: If the site sets a cookie on request 1 and expects the same IP on request 2, rotation breaks the flow. This includes most login-protected content, shopping carts, and multi-page forms.
Rate-limited APIs: Some APIs rate-limit per IP per minute. With rotating IPs, you might hit the same exit IP twice by chance and trigger a limit. For APIs, sticky sessions with a dedicated IP per worker thread is more predictable.
How Sticky Proxies Work
Sticky sessions maintain the same exit IP for a time window. With ProxyLabs, that window is 10, 30, 60 or 120 minutes. The dashboard writes the length in seconds as -ttl-, then the id as -session-. The order is country, region, city, -ttl-, -session-. -ttl- is a lifetime from the start of that session. Reusing the session id inside the window keeps the address. It does not start the clock again. A new session id is how you ask for another address. Copy the finished string from the dashboard. Europe, Asia, and worldwide use eu.proxylabs.app:8080. The Americas use us.proxylabs.app:8080.
import requests
# Same session ID = same IP for the ttl you set (10, 30, 60 or 120 minutes)
proxy = {
'http': 'http://your-username-ttl-3600-session-abc123:[email protected]:8080',
'https': 'http://your-username-ttl-3600-session-abc123:[email protected]:8080',
}
for i in range(5):
r = requests.get('https://httpbin.org/ip', proxies=proxy)
print(f"Request {i+1}: {r.json()['origin']}")
# Output: same IP all 5 times
When Sticky Proxies Excel
Login flows: The server ties your session cookie to your IP. If the IP changes between the login POST and the next authenticated request, the session is invalidated. Most sites with user accounts do this.
import requests
import uuid
session = requests.Session()
session_id = uuid.uuid4().hex[:12]
proxy = {
'http': f'http://your-username-ttl-3600-session-{session_id}:[email protected]:8080',
'https': f'http://your-username-ttl-3600-session-{session_id}:[email protected]:8080',
}
# Login
session.post('https://example.com/login',
data={'email': '[email protected]', 'password': 'pass'},
proxies=proxy
)
# Subsequent requests use the same IP — session cookie stays valid
dashboard = session.get('https://example.com/dashboard', proxies=proxy)
settings = session.get('https://example.com/settings', proxies=proxy)
Account management: Managing multiple social media accounts requires each account to have a consistent IP. If account A always connects from IP 1 and account B always connects from IP 2, they look like separate users. If both cycle through random IPs, the platform may link them.
E-commerce checkout: Cart → shipping → payment → confirmation is a multi-step flow where the server expects IP consistency. Mid-flow IP changes trigger fraud detection on most e-commerce platforms.
For a detailed guide on sticky session patterns, see our sticky sessions guide.
Sticky Proxy Pitfalls
Long scraping jobs: A sticky session sends every request in that window out of one address. A target that limits how much one address can fetch will apply that limit to the whole window. Use a new session id per batch when the pages do not need to share an address.
The window ends: The address is held for the TTL you set, measured from the start. When you need another address, generate a new session id. When you need the same address tomorrow, use a dedicated ISP proxy. A sticky session does not cover that.
Hybrid Approach: Rotating + Sticky
Most real scraping jobs need both. The pattern: use rotating IPs for the bulk scraping work, switch to sticky for any stateful flows.
import requests
import uuid
PROXY_BASE_USER = 'your-username'
PROXY_PASS = 'your-password'
TTL_SECONDS = {10: 600, 30: 1800, 60: 3600, 120: 7200}
def gateway(country):
"""us, ca, mx, br, ar, co, cl, pe use us.proxylabs.app. UK is gb, on eu."""
code = (country or '').lower()
if code == 'uk':
code = 'gb'
if code in {'us', 'ca', 'mx', 'br', 'ar', 'co', 'cl', 'pe'}:
return 'us.proxylabs.app:8080'
return 'eu.proxylabs.app:8080'
def country_code(country):
code = country.lower()
return 'gb' if code == 'uk' else code
def rotating_proxy(country=None):
"""New connection, no session id, so the gateway can assign a new address."""
user = PROXY_BASE_USER
if country:
user += f'-country-{country_code(country)}'
host = gateway(country)
return {
'http': f'http://{user}:{PROXY_PASS}@{host}',
'https': f'http://{user}:{PROXY_PASS}@{host}',
}
def sticky_proxy(session_id=None, country=None, minutes=60):
"""Same session id keeps one address for the ttl, measured from the start."""
user = PROXY_BASE_USER
if country:
user += f'-country-{country_code(country)}'
if not session_id:
session_id = uuid.uuid4().hex[:12]
user += f'-ttl-{TTL_SECONDS[minutes]}-session-{session_id}'
host = gateway(country)
return {
'http': f'http://{user}:{PROXY_PASS}@{host}',
'https': f'http://{user}:{PROXY_PASS}@{host}',
}
# Phase 1: Rotating IPs to collect product URLs
product_urls = []
for page in range(1, 20):
r = requests.get(
f'https://example.com/products?page={page}',
proxies=rotating_proxy('us'),
timeout=15,
)
# Parse product URLs from response...
product_urls.extend(parse_urls(r.text))
# Phase 2: Sticky IP per product for detail + price + reviews
for url in product_urls:
sid = uuid.uuid4().hex[:8]
proxy = sticky_proxy(session_id=sid, country='us', minutes=60)
session = requests.Session()
detail = session.get(url, proxies=proxy, timeout=15)
reviews = session.get(url + '/reviews', proxies=proxy, timeout=15)
# Same IP for both requests — looks like a real user browsing
Bandwidth Considerations
Sticky and rotating sessions use the same bandwidth. The cost difference comes from efficiency:
| Scenario | Rotating | Sticky | Why |
|---|---|---|---|
| 1,000 independent pages | 1× bandwidth | 1× bandwidth | Same data either way |
| Login + 50 pages (session needed) | The login runs again after each new address | 1× bandwidth | Rotating breaks the login, so the flow starts again |
| 100 URLs, strict rate limit (5/min/IP) | 1× bandwidth | 1× bandwidth | But sticky requires 20 IPs at 5 req each |
With ProxyLabs, bandwidth is priced the same regardless of session type. It lists at £2.50/GB, is £1.00/GB from 5,000 GB, and is £0.95/GB from 10,000 GB. The economic decision is about minimizing wasted bandwidth from failed requests, not about session pricing.
How to Set Sessions in Different Tools
| Tool | Rotating | Sticky |
|---|---|---|
| requests (Python) | No session modifier | Country, then -ttl-, then -session-, on the username |
| Scrapy | No session modifier | Same username order on the proxy URL |
| Playwright | No session modifier | Same username order. See the Playwright guide |
| Puppeteer | No session modifier | Same username passed to page.authenticate() |
| cURL | No session modifier | Same username in the proxy URL |
| Axios | No session modifier | Same username. See the Axios guide |
For tool-specific setup, see our integration guides: Playwright, Selenium, Puppeteer, Scrapy, or cURL.