INFO
Sticky Sessions
Maintain a consistent proxy IP across multiple requests.
Session IDs allow you to maintain a consistent proxy IP across multiple requests. This is useful when you need to maintain state or identity across a series of requests.
Session ID Format
Session IDs must follow these rules:
- Length: 1-25 characters
- Allowed characters: alphanumeric (
a-z,A-Z,0-9) and underscores (_) - Hyphens (
-) are not allowed in session IDs
Valid Examples
abc123
my_session
Session_1
a
Invalid Examples
my-session (contains hyphen)
session@123 (contains special character)
Combining with Geo-Targeting
You can combine sticky sessions with geo-targeting to maintain a consistent IP within a specific geographic location.
Examples
# Using HTTP headers
curl -x http://USERNAME:PASSWORD@res.beta.globalbyte.io:10000 \
-H "session: my_session_123" \
https://httpbin.org/ip
# Using username suffix
curl -x http://USERNAME-session-my_session_123:PASSWORD@res.beta.globalbyte.io:10000 \
https://httpbin.org/ip# Using HTTP headers
curl -x http://USERNAME:PASSWORD@res.beta.globalbyte.io:10000 \
-H "country: US" \
-H "state: TX" \
-H "session: texas_session" \
https://httpbin.org/ip
# Using username suffix
curl -x http://USERNAME-country-US-state-TX-session-texas_session:PASSWORD@res.beta.globalbyte.io:10000 \
https://httpbin.org/ipResponses
Code: 200
Description: Successfully routed through a sticky session.
Code: 400
Description: Invalid session ID (empty, too long, or contains invalid characters).
{
"origin": "172.59.208.148"
}Invalid targeting: Invalid session ID: contains invalid characters