The fundamental working principle of Rotating Proxy services is to maximize anonymity and diversity by returning a different IP address for each request. However, in some use cases, you may need to use the same IP address for a certain period. This is where the Sticky Session feature comes into play.
In standard use with a Rotating Proxy system, each connection request is made through a different IP address. For example, when you select the United Kingdom (GB) location, your system connects by pulling random IP addresses from a large IP pool belonging to that country. Thanks to this mechanism:
The Sticky Session feature is an advanced capability that allows you to use the same IP address for a certain period in your Rotating Proxy service. With this feature, you can create a "session" key to ensure that all your requests are made through the same IP address during the specified period.
The sticky session feature is particularly critical in the following situations:
To use sticky session, you need to configure your proxy connection information in a special format. The general usage format is as follows:
Username Format:
your_username-session-SESSION_KEY-country-COUNTRY_CODE
Example Configuration:
| Component | Description | Example |
|---|---|---|
| Username | Your account-specific username | user12345 |
| Session Key | Unique session identifier (any string you want) | mysession1, abc123, login_session |
| Country Code | Two-letter ISO country code | gb, us, tr, de |
| Proxy Address | Rotating proxy server address | rotate.livaproxy.com |
| Port | Proxy connection port | 12345 |
Complete Configuration Example:
Proxy Host: rotate.livaproxy.com
Proxy Port: 12345
Username: user12345-session-session1-country-gb
Password: your_account_password
There are two basic methods to switch to a different IP address from the same country location:
The most practical method is to change your session key. Each different session key assigns a different IP address:
user12345-session-session1-country-gb → IP: 185.x.x.1user12345-session-session2-country-gb → IP: 185.y.y.2user12345-session-session3-country-gb → IP: 185.z.z.3The values you can use as session keys are entirely up to you: numbers, letters, words, or combinations can be used.
If you don't use the session parameter, the system automatically returns a different IP for each request:
Username: user12345-country-gb
Password: your_account_password
In this configuration, each HTTP request, each API call, or each browser connection uses a different IP address.
One of the most powerful features of Rotating Proxy services is the ability to use multiple sessions simultaneously. This way:
| Task | Session Key | Country | Purpose |
|---|---|---|---|
| Thread 1 | session-worker1 | us | US data collection |
| Thread 2 | session-worker2 | gb | UK data collection |
| Thread 3 | session-worker3 | de | Germany data collection |
| Login Operation | session-account1 | tr | Account management |
When using sticky session, the IP address remains constant as long as your specified session key is active. However, IP changes may occur in some situations:
Using sticky session with Python and the requests library:
import requests
# Proxy configuration
proxy_host = "rotate.livaproxy.com"
proxy_port = "12345"
username = "user12345-session-mysession1-country-gb"
password = "your_password"
proxies = {
"http": f"http://{username}:{password}@{proxy_host}:{proxy_port}",
"https": f"http://{username}:{password}@{proxy_host}:{proxy_port}"
}
# Multiple requests with the same IP
for i in range(5):
response = requests.get("https://api.ipify.org", proxies=proxies)
print(f"Request {i+1} - IP: {response.text}")
In this example, all requests are made through the same IP address. You can get a new IP by changing the session key.
| Feature | Normal Rotating | Sticky Session |
|---|---|---|
| IP Change Frequency | Every request | Static for session duration |
| Use Case | Fast data collection, maximum anonymity | Login operations, multi-step processes |
| IP Control | System automatic | User-controlled (with session key) |
| Configuration | Simple | Session parameter required |
If your IP is changing despite using the same session key:
If the session feature is not active:
Using sticky session helps you optimize your traffic in GB-based billing Rotating Proxy packages:
The sticky session feature in Rotating Proxy services is a powerful tool that provides flexibility and control. It's important to choose the right strategy based on your use case:
For detailed technical support, you can contact our 24/7 support team and get configuration recommendations for your specific use cases.