Using Rayobyte's Sticky Session Feature




Rayobyte's sticky session functionality allows users to maintain a consistent IP address for a specified duration when using residential proxies. This feature is designed to cater to various use cases and preferences. In this document, we'll explain how to configure and use sticky sessions with Rayobyte's residential proxies, including an option to disable automatic IP rotation.




Default Sticky Session Functionality (Auto-rotate IP on Failed Request)


By default, our system employs the "-session" parameter for sticky sessions. When you configure your proxy password, you'll need to include the following:

password121-session-<random string>

The <random string> represents your session ID value. Your full proxy configuration will look like this:

username123:password123-session-ABCDEFG@la.residential.rayobyte.com:8000



It may also be formatted like this if the tool you're using has a different UI setup:


- Username: username123

- Password: password123-session-ABCDEFG

- IP: la.residential.rayobyte.com

- Port: 8000


With the default sticky session setup, you will retain the same IP address for 120 minutes. During this time period, if you have a failed request to a target site, your IP will auto-rotate to a new one. After the 120 minutes expires, the IP will automatically rotate as well. If you wish to obtain a new IP before the 120-minute mark, you can simply create a new request with a different session ID.


NOTE: Because some websites load ancillary domains that may timeout, you could experience more frequent rotation than you'd like. If you run into issues with this auto-rotation, please see the alternative "-hardsession" parameter option in the section below.




Alternate Sticky Session Functionality (Keep IP on Failed Request)


NOTE: Because some websites load ancillary domains that may timeout, you could experience more frequent rotation than you'd like. If you run into issues with this auto-rotation, this feature can assist you in not rotating the IP upon failed requests to ancillary domains.


If you find that the IPs within a sticky session rotate too frequently for your specific use case, you can disable the automatic rotation functionality by using the "-hardsession" parameter. With this parameter, if the connection to the IP or target site fails, you will receive an error message instead of being assigned a new IP address. To use the "-hardsession" parameter, modify your proxy password as follows:


password121-hardsession-<random string>

Using the "-hardsession" parameter can help you avoid frequent IP rotations within a session, ensuring a more stable connection.






Geolocation Targeting with Sticky IPs


Rayobyte's sticky IPs can also be used in conjunction with our geolocation targeting functionality. To specify a country for your proxy, add the country code to your configuration. Here are two examples of properly formatted proxies for geolocation targeting:


username123:password123-country-US-session-ABCDEFG@la.residential.rayobyte.com:8000
username123:password123-session-ABCDEFG-country-US@la.residential.rayobyte.com:8000


These configurations allow you to combine sticky sessions with geolocation targeting for enhanced proxy control.


Important Note


It's important to be aware that due to the nature of residential proxies, sticky IP sessions can disconnect unexpectedly. This may occur when a user's end device is turned off or loses internet connectivity for any reason. When such a disconnection occurs, you'll need to detect it on your end and retry your request with a new session ID to receive a new sticky IP. Rayobyte's sticky session functionality aims to provide flexibility while working with residential proxies, but it's essential to account for potential interruptions in connectivity.