Rotating or Sticky Session: How to Set Up IP Changes for Your Task

When you need a new IP on every connection and when you need one address for half an hour. How both modes work, what session lifetime to set and the most common mistakes.

5 min read

When you create a proxy in the dashboard, you pick a mode: rotating or sticky session. It looks like a detail, but it decides whether your task works at all. Many support tickets that say "the proxies do not work" come down to the wrong mode while the proxies themselves are fine.

Rotation: a new IP on every connection

With rotation, every new connection goes online through a different address from the pool of the chosen country. A website sees a hundred connections as a hundred different visitors.

This is exactly what scraping needs. Rate limits are almost always counted per IP. When the load is spread over hundreds of addresses, you never reach the limit.

Note that the IP changes per connection, not per request. If your HTTP client keeps the connection alive and sends ten requests over one TCP connection, all ten leave from the same address. When a script shows repeating IPs while you test rotation, this is usually why. The easiest way to test is curl: every call opens a new connection.

bash
# every curl call opens a new connection, so the IP is new
for i in 1 2 3; do
  curl -s -x http://LOGIN:PASSWORD@proxy-dealer.com:5555 https://api.ipify.org
  echo
done

If you create several rotating proxies in the dashboard at once, their usernames differ by a line tag. It only helps you tell the configs apart and has no effect on IP changes.

Sticky session: one IP for a set time

A sticky session pins one address to you. All connections go through it until the session ends. Any work that involves logging into an account needs this mode.

Here is what rotation inside an account looks like from the platform side. A user entered the password from New York, opened settings from Chicago a second later and clicked "Save" from Dallas a second after that. No anti-fraud system lets that through. In a sticky session all account work goes from one IP, just like a regular person.

The session is set by a tag in the username. The dashboard adds it for you, but it helps to know what the username is made of:

text
LOGIN-country-US-city-chicago-sid-k3v9x2ab-ttl-30m
       │          │            │            └ lifetime: 30 minutes
       │          │            └ session id
       │          └ city
       └ country

As long as the session id (sid) stays the same, you get the same IP. A new sid means a new address. So one balance can hold several independent profiles: create several sticky proxies in the dashboard, and each gets its own sid.

What lifetime to set

Behind a residential or mobile IP there is somebody's real device. If the owner switches off the router or the phone loses signal, the session ends early and you get a new address. Nobody can prevent that, it is how these networks work. So set the lifetime your task needs, without a big margin. The dashboard allows up to two hours.

TaskModeLifetime
Scraping a catalog or search resultsRotatingnot set
Checkout, multi-step formSticky10 to 15 minutes
Work in an ad accountSticky30 to 60 minutes
Antidetect browser profileSticky, a separate one per profile30 to 60 minutes

The opposite also happens: the session is alive, but the device is slow. In our measurements, the speed of mobile devices in the same country can differ several times over. If a sticky proxy is noticeably slow, do not wait for the session to end: recreate the proxy in the dashboard. A new sid gives you another device.

The most common mistakes

Rotation in an antidetect browser

A browser opens dozens of connections in parallel: images, scripts, fonts. With rotation each one leaves from a new IP, and the website sees one page loaded from fifteen different places. Browser profiles need sticky sessions only.

One sticky proxy for several accounts

If three accounts work through one sid, the platform sees them on one IP, and that is a direct link between them. Every account needs its own session.

Sticky for mass scraping

The whole stream of requests goes through one address and quickly hits the limit. The script gets error 429 or a captcha, and the proxies seem bad. For data collection, use rotation.

Try it on your own task

Residential: $3 per GB, mobile: $4 per GB. Pay for traffic, no subscription, gigabytes never expire.

CREATE ACCOUNT