Sticky Session Proxies: Keep One IP From 1 Second To 60 Minutes
Sticky session proxies keep the same IP for a set time. How session TTL works on Rainproxy, the -session and -time tokens, and which products support it.

By default a rotating proxy gives every request a new IP. That is perfect for spreading load, and wrong for anything that needs to stay logged in or finish a multi-step flow. Sticky sessions solve that. This guide explains how sticky sessions work on Rainproxy, how to choose the sticky time and where the limits are.
Rotating vs sticky
Rotating: each request leaves through a new IP. Good for fetching many independent pages.
Sticky: requests with the same session ID leave through the same IP until the sticky time ends. Good for anything where the target links your requests together, such as a login cookie or a cart.
On Rainproxy, if you do not set a session, every request gets a new IP.
When you need sticky sessions
- Logins, carts and checkouts that must finish on one IP.
- Multi-step forms and paginated flows behind a session cookie.
- Account management where switching IPs in the middle of a session can trigger a review.
- Browser automation where one browser profile should keep one IP while it works.
How to set it up at Rainproxy
Add two tokens to the proxy username:
-session-<id>— any ID you choose. The same ID keeps the same IP.-time-<minutes>— how long the IP should stick.
user-country-US-session-abc123-time-10
The sticky time can be set from 1 second to 60 minutes. When it ends, the session rotates to a new IP. To get a new IP earlier, use a new session ID. You can also set this up in the dashboard Generator.
Choosing the sticky time
Pick the shortest time that covers your whole flow:
- A few minutes for a login and a handful of page views.
- Ten to thirty minutes for longer checkouts or form sequences.
- Up to sixty minutes for long-running dashboard work.
Longer is not automatically better. A residential IP belongs to a real device that can go offline. The longer you hold one IP, the more likely that device disconnects during your session.
Which products have it
Session TTL is available on:
See the Session TTL section on the features page for a short overview.
Sticky sessions vs strict sessions
A normal sticky session aims to keep the same IP. If the device behind that IP goes offline, your requests continue on another IP, so your flow keeps running.
Sometimes that switch is exactly what you do not want — for example when a new IP in the middle of a checkout is worse than an error. For that case, Premium and Exclusive Residential offer strict session, which keeps one exact IP and fails instead of switching. Read our guide to static IP sessions with strict session.
Combining with targeting
Sticky sessions work together with location targeting. You can hold one IP inside a city, a postcode or an ASN, as long as the product you use supports that filter. See our guides to city and state targeting and ZIP code proxies.
ASN targeting or location targeting?
The two filters answer different questions. Location targeting answers "where does the visitor appear to be?" ASN targeting answers "which network is the visitor on?" Many tasks only need the first. A regional price check, for example, usually depends on country, state or city, not on the provider.
Choose ASN targeting when you have a concrete reason to believe the network matters:
- You have seen results change between providers on the same target.
- You are studying something that is defined by the network, such as routing or provider-level content.
- You want to repeat a test later on the same kind of connection, so that a change in results is not caused by a different provider.
If you are unsure, run a short test: send the same requests with country targeting only, then with country plus ASN, and compare. If the results are the same, leave ASN out and enjoy the larger pool.
Finding the right ASN
Public ASN lookup tools list the numbers that belong to a provider and the countries they operate in. Pick the number that matches both the provider and the country you plan to target, and check a few sample IPs from that ASN to confirm it covers residential connections rather than only business or hosting ranges.
A worked example
Say you want to compare how a page behaves for customers of two providers in Germany. Look up the ASN of each provider first, then create one username per ASN:
user-country-DE-asn-3320user-country-DE-asn-<second ASN>
Run the same requests through both and compare the results. If you need each run to stay on one IP for several steps, add -session-<id>-time-<minutes>. Only add a state or city if the comparison needs it: every extra filter reduces the number of IPs that match.
Common setup mistakes
- Using a provider name instead of a number. The token takes the ASN number only.
- Mixing up country and ASN. An ASN that mainly operates in one country will have few or no exits if you pair it with a different country.
- Stacking every filter at once. Country plus ASN plus state plus city can leave very few matching IPs. Add filters one at a time.
- Wrong product. ASN targeting applies on Premium Residential and Exclusive Residential.
How to check it is working
Send a few requests to an IP information page that shows the ASN of the IP and confirm it matches the number you asked for. Then test on your own target with a small sample. If you see too much repetition, loosen the location filters first and keep the ASN.
A worked example
Imagine an automation that runs ten browser profiles in parallel, each one logging in and working through a short dashboard flow. Give each profile its own session ID and a sticky time that covers the flow:
- Profile 1:
user-country-US-session-p1-time-15 - Profile 2:
user-country-US-session-p2-time-15
Each profile keeps its own IP for fifteen minutes, and the profiles do not share an IP with each other because their session IDs differ. When a profile starts a new task, give it a new session ID so it gets a fresh IP instead of reusing the old one.
Common setup mistakes
- Reusing one session ID across workers. Every worker with the same ID shares the same IP. Use one ID per profile or per flow.
- Forgetting the session token. Without
-session-<id>, every request gets a new IP, even if you set a time. - Picking the maximum by default. Sixty minutes is the upper limit, not a recommendation. Shorter sessions are less exposed to a device going offline.
- Assuming the IP can never change. A normal sticky session moves to another IP if the device disconnects. If that is not acceptable, use strict session.
How to check it is working
Send a request to an IP information page every minute with the same session ID and note the IP. It should stay the same until the sticky time ends, unless the device goes offline. Then repeat with a new session ID and confirm you get a different IP.
Honest limits
- Residential IPs can go offline. A sticky session cannot keep a device online. If it disconnects, a normal sticky session moves to another IP.
- Sixty minutes is the maximum. For longer identities, start a new session or look at static products.
- No promise about any specific site. We do not promise results on any named website or app.
Getting started
The free trial includes 250 MB in total — 125 MB of Premium Residential and 125 MB of Exclusive Residential — claimed through live chat, so you can try sticky sessions before buying. Plans are on the pricing page.
Spin up your first session in 60 seconds.
250 MB on us, activated by our team in live chat. No credit card. Real residential and mobile IPs across 195+ countries.