Session Types
DocsSession Types

Session Types

Rotating proxies change IP on every request. Sticky sessions keep the same IP for a configurable window. Here's how to use both.

Rotating Sessions

The default mode. Each request is routed through a different IP from the pool. No additional username parameters are needed — just use port 823 (HTTP) or 824 (SOCKS5).

cURL — rotating (default)
curl -x http://USERNAME:PASSWORD@proxy.raxyproxy.com:823 https://httpbin.org/ip

Best for: large-scale scraping, price monitoring, ad verification, any task where IP diversity is the goal.

Sticky Sessions — Port-Based

Connect to any port in the range 10000–20000. Each port maps to a fixed IP for the lifetime of that port's connection slot. The same port always returns the same IP — no extra username parameters needed.

cURL — sticky port 10001
curl -x http://USERNAME:PASSWORD@proxy.raxyproxy.com:10001 https://httpbin.org/ip
# Every request on port 10001 returns the same IP
Python — multiple sticky slots
import requests

proxies_list = [
    f"http://USERNAME:PASSWORD@proxy.raxyproxy.com:{port}"
    for port in range(10001, 10011)  # 10 independent sticky slots
]

for i, proxy_url in enumerate(proxies_list):
    r = requests.get("https://httpbin.org/ip", proxies={"http": proxy_url, "https": proxy_url})
    print(f"Slot {i}: {r.json()['origin']}")

Best for: running multiple independent sessions in parallel (e.g. 50 scraping workers each with their own persistent IP).

Sticky Sessions — Session ID

Append __sessid.YOURSTRING to your username. The same session string always resolves to the same IP for approximately 30 minutes (configurable with sessttl). This works on standard ports (823/824).

cURL — sessid sticky
# session "checkout-user-42" will always get the same IP
curl -x http://USERNAME__sessid.checkout-user-42:PASSWORD@proxy.raxyproxy.com:823 \
     https://httpbin.org/ip
Python — sessid sticky
import requests

session_id = "user-session-abc123"

proxies = {
    "http":  f"http://USERNAME__sessid.{session_id}:PASSWORD@proxy.raxyproxy.com:823",
    "https": f"http://USERNAME__sessid.{session_id}:PASSWORD@proxy.raxyproxy.com:823",
}

# All requests with the same session_id use the same IP
r1 = requests.get("https://httpbin.org/ip", proxies=proxies)
r2 = requests.get("https://httpbin.org/ip", proxies=proxies)
print(r1.json(), r2.json())  # same IP

Session ID format

The session string can be any alphanumeric string. Use meaningful names (e.g. user-42, task-abc) to track sessions in your code.

Best for: login flows, multi-step checkout, form submissions, AI agents that need persistent state across multiple requests.

Session Duration — sessttl

Residential IPs can go offline at any time — we recommend keeping sessions to 30 minutes or less for reliable performance. You can set a longer duration up to 120 minutes using sessttl, but the same IP is not guaranteed for the full window.

cURL — sessid + custom TTL (60 min)
curl -x http://USERNAME__sessid.mysession;sessttl.60:PASSWORD@proxy.raxyproxy.com:823 \
     https://httpbin.org/ip

Parameter order

When combining sessid and sessttl, use a semicolon to separate them: __sessid.ID;sessttl.MINUTES. Do not put sessttl before sessid.

Comparison

FeatureRotatingSticky — PortSticky — sessid
Port823 / 82410000–20000823 / 824
IP changesEvery requestPer port (persistent)Per sessttl (≤30 min recommended)
Username changeNoneNoneAppend __sessid.ID
Parallel sessionsUnlimitedOne per port (up to 10,001 slots)Unlimited (one per unique ID)
Best forVolume scrapingMultiple independent workflowsSingle user sessions / auth flows

Using session types from an AI agent?

The RaxyProxy Claude Code skill generates rotating or sticky proxy strings automatically — including session IDs and geo-targeting — without you constructing the username format manually. Install with npx skills add raxyproxy/skills.