Skip to content

Guides · Sessions and traffic

Sticky proxy sessions: rotation and duration

Use a saved sticky configuration to request reuse of an available binding for related work. It does not reserve an exit device or keep its public IP fixed. Timed modes are evaluated on later connections using the saved SID; device availability and the network still determine whether that route can continue.

By PortproofPublished Updated

Short answers

How long does a sticky proxy session last?

Saved configurations accept an optional sliding binding lifetime of 60 to 2,592,000 seconds. This is separate from timed rotation minutes. Sticky requests a binding preference while available; it does not reserve a device or guarantee how long an IP stays unchanged. Elapsed time does not prove that an earlier exported URL can no longer create a binding.

Does a new session name guarantee a different IP?

No. It identifies a different session. The resulting address is an observation, not a unique identifier for that session or its device.

A sticky session prefers an existing binding without reserving a device; the carrier may still change the IP. Choose the mode around the work you need to complete, then test that work with its actual client.

Choose between connection rotation, timed rotation and sticky sessions

Choose between connection rotation, timed rotation and sticky sessions
ModeUsername settingSuitable starting point
Per-connection rotationrot-ondemandIndependent read-only checks that do not need to share a route.
Timed rotationrot-auto5, rot-auto10, rot-auto20, rot-auto60Related checks organised into a rotation window of 5, 10, 20 or 60 minutes.
Sticky sessionrot-sticky with sid-<name>A QA journey or multi-step data collection task that should keep its selected device.

Per-connection rotation does not mean a new address for every HTTP request. A client can reuse a connection for several requests. Connection reuse is a normal HTTP-client behaviour; curl explains it in its connection reuse documentation.

Timed rotation is a routing setting, not a guarantee that an existing connection will change address at an exact instant. Test the boundaries your job depends on.

Keep one name for one job

A session name accepts one to 64 lower-case letters, digits or underscores. Keep it for the related requests in one job. Do not generate a new name inside the loop that sends each request.

The example below creates configuration only. It sends no request and contains no credential. Create it once when the job starts, then use the same settings in the connection builder API:

Create one session name for one jobpython
from uuid import uuid4

session_name = "qa_" + uuid4().hex
connection_settings = {
    "pool": "residential",
    "country": "any",
    "rotation": "sticky",
    "session": session_name,
    "protocol": "http",
}

country: "any" is illustrative. Select the country your job requires and check its current availability. The setup documentation explains the connection fields.

The server allocates and saves an opaque SID for each logical configuration. The legacy builder treats a supplied session name as a local alias and exports the stored SID. Names help you identify jobs locally; earlier exported URLs remain unchanged and are not isolated retroactively. Never put a password, email address or customer identifier in a session alias.

What the ttl setting means

Use the saved configuration's ttl_seconds field for a sliding binding lifetime. For example, 900 requests 15 minutes, separate from auto-mode rotation. Changing this field or a timed mode creates a new SID and configuration version; changing tokens on an existing SID does not reliably reset the stored timer. Expiration does not revoke an exported URL.

Use ttl_seconds in saved settings or the public POST /v1/traffic/build-url request; arbitrary query or body fields are refused. Preserve the exported URL instead of editing its SID or tokens. A lifetime is not a promise of availability for a long run. See username settings.

Separate session lifetime, device availability and IP continuity

These are three different things:

  • Session lifetime: how long the configured session is intended to remain usable.
  • Device availability: whether the selected device can still carry traffic.
  • IP continuity: whether the network keeps the same public address on that device.

A longer lifetime cannot keep an offline device connected or prevent its network from changing the address. Portproof traffic uses shared pools. Check whether your workflow requires a continuing application session, the same exit device or an unchanged IP; those requirements need different tests.

Browser cookies are separate again. Changing an exit does not automatically delete them. The destination application decides whether its session remains valid. How HTTP cookies work.

Decide what to do when a session stops working

Keep the last completed step and the error, then stop before repeating a write. For a read-only check, a limited retry with a delay may be appropriate. For a purchase or form submission, confirm whether it completed before trying again; follow the application’s idempotency rules. HTTP retry semantics.

If you need to begin again on another session, restart from a known application state. Do not clear all cookies merely because the address changed. In Python, a Requests Session maintains its own cookie state and connection pool independently of the proxy session name. Requests Session behaviour.

Use sticky-session troubleshooting to investigate a changed address and CONNECT troubleshooting for tunnel failures.

Match the session boundary to the task

Match the session boundary to the task
TaskSession boundaryWhat to verify
QA journey through your own appOne name for the journeyApplication state survives each permitted step.
Ad or landing-page verificationOne name for the page and related checksThe actual browser uses the intended configuration.
Independent public-page checksSeparate jobs may rotateRate limits, permissions and each response are handled.
Scheduled collectionDecide whether runs share stateReusing a name is intentional, not an accidental default.

A sticky session does not set request pacing. Respect the destination’s permitted access and rate limits in every mode.

Measure the traffic your job actually uses

Rotation settings alone do not predict bandwidth. Payload size, browser assets, connection reuse and retries all affect the work performed. Measure a small representative run before estimating a larger one.

Use the traffic accounting guide to understand the usage counter and the GB planning guide to size an order. Current traffic rates are on pricing.

Check these before starting a long run

  1. Keep the complete pool, country, rotation and session settings consistent through the job.
  2. Give independent jobs deliberate session names rather than sharing one by accident.
  3. Confirm any lifetime requirement instead of treating the largest accepted ttl as an availability promise.
  4. Keep credentials out of logs. Record a non-sensitive job label, timestamps and error codes.
  5. Test recovery at an application boundary you can safely restart.

If an unchanged IP is essential, detect changes and pause the affected job. That check measures your requirement; it does not identify which device the network used.

What is not allowed

Use sessions for permitted work such as QA, ad verification and market research. Follow the acceptable-use policy.

More in Sessions and traffic

Buy mobile and residential proxy GB

Choose your GB or reserve a mobile device.

Buy pool GB Try 1 GB for EUR 1.49

Once per customer. Cryptocurrency network minimums and fees vary.