NEWStandard createTask and in.php APIs. Change the address and you are connected.View API docs
GATESOLVER

Proxies and networking

Rotating or sticky proxies for form flows?

Sticky. A form flow spans several requests that the site links through cookies, and changing the IP in the middle breaks that link or raises a challenge.

The rule of thumb

If requests depend on each other, keep one IP. If they do not, rotate. A form flow such as login, search with filters, cart and checkout, or a multi-page signup is a chain: the site sets cookies on the first step and expects them, from the same visitor, on the next. A sticky session keeps the exit IP the same for a set time, which is what such a chain needs. Rotating proxies give a new IP per request or per connection, which is ideal for fetching thousands of unrelated product pages.

What breaks when you rotate mid-flow

  • Session cookies tied to IP. Some sites bind the session to the IP and log you out when it changes.
  • Clearance cookies. Cloudflare's cf_clearance and DataDome cookies only work from the IP that earned them. A new IP means a new challenge.
  • Risk scores. One visitor whose IP jumps between countries between two clicks looks like a bot or a hijacked session, so the site shows a CAPTCHA or blocks the action.
  • CSRF and form tokens. They usually survive an IP change, but combined with the above, the submit often fails anyway.

How sticky sessions work

With most providers you request stickiness through the username or a dedicated port: a session id in the username keeps the same exit IP for a period, often 10 to 30 minutes, sometimes longer. Reuse the same id for every request in the flow, and generate a new id for the next flow. The exact syntax differs by provider, so check your provider's documentation.

import uuid, requests

def flow_session(base_user, password, gateway):
    sid = uuid.uuid4().hex[:10]
    proxy = f"http://{base_user}-session-{sid}:{password}@{gateway}"
    s = requests.Session()
    s.proxies = {"http": proxy, "https": proxy}
    return s, proxy   # pass the same proxy string to any proxy task in this flow

The username pattern above is only an example of the idea; your provider's real format may differ.

Combining both in one job

Most real jobs need both. Discovery (finding product URLs, crawling listings) runs on rotating IPs for speed and spread. Each flow that needs state (logging in to your own account, submitting a search form with a CAPTCHA, completing a multi-step quote) gets its own sticky session. When the flow ends, release it.

Sticky sessions and CAPTCHA tasks

If a flow meets a Cloudflare challenge page or a DataDome slider, create the task with the same sticky proxy string you use for the flow. The solver passes the check through that IP, and the cookie it returns works for your next requests. With a rotating proxy, the solve happens on one IP and your request on another, and the cookie is refused. For token widgets in proxyless mode, rotation matters less for the solve, but the submit should still come from the flow's sticky IP. See proxy format for tasks and the Cloudflare Challenge page for the fields.

How long should a sticky session last?

Long enough for the whole flow plus a margin, and no longer. Very long sessions put many requests on one IP, which raises its challenge rate; very short ones expire mid-flow. Measure how long a flow takes at the 95th percentile and set the session a few minutes beyond. If your provider's maximum is shorter than your flow, split the flow into stages that can each restart cleanly.

Common mistakes

Sharing one sticky session across many parallel flows piles their traffic onto one IP. Forgetting to set a new session id for each flow makes every flow reuse an IP that may already be flagged. And using a rotating gateway for a browser that keeps cookies across navigations quietly mixes IPs inside what the site sees as one visit. The page on IP rotation covers rotation strategies in more depth.

Common questions

What is a sticky session?

A proxy setting that keeps the same exit IP for a period, usually chosen by a session id in the username.

Can I scrape listing pages with sticky proxies?

Yes, but rotating IPs spread independent page fetches better and reduce the load on each IP.

Why does my Cloudflare cookie fail with rotating proxies?

The cookie is tied to the IP that solved the challenge, and rotation sends the next request from another IP.

How long do sticky sessions last?

It depends on the provider, commonly 10 to 30 minutes; check your plan's options.

Should a CAPTCHA proxy task use the sticky proxy?

Yes. Use the same proxy string as the flow so the solve and your requests share one IP.

Keep reading