← Blog · · 5 min read

Sticky Sessions vs. Rotating Residential Proxies: How to Choose

A residential proxy integration has two different jobs to solve: choosing an appropriate exit and deciding how long that exit should remain associated with the work. Rotation and stickiness are the two basic controls for that second decision.

Neither behavior is universally better. Automatic rotation gives independent work a fresh residential exit, while a sticky session preserves continuity for a sequence that must look like one visit. The correct choice follows the shape of the task.

What rotating residential proxies do

PacketStream’s automatic rotation selects a residential exit for each new proxy connection. In practical terms, requests made over separate connections can leave through different residential IPs without your application maintaining an IP list.

That makes rotation a natural fit when each unit of work stands alone, such as:

  • collecting public product pages that do not share a login or cart;
  • checking localized public content across independent jobs;
  • distributing a large queue of idempotent requests;
  • verifying that a result is not unique to one residential connection.

The connection boundary matters. HTTP clients often reuse a connection for efficiency. Ten requests sent through one pooled connection are not the same experiment as ten requests made over ten new connections. If rotation is important to your test, configure the client deliberately and confirm the observed exits.

What a sticky session does

A sticky session asks the network to reuse the same residential exit for related connections. With PacketStream, append a session identifier to the auth key:

AUTH_KEY_session-catalog42

Sticky sessions are available to every customer and can retain an exit for up to 60 minutes. The session is an association with an available Packeter, not a guarantee that a device will remain online. If that Packeter disconnects, the sticky session fails.

Stickiness is useful when the destination expects continuity between steps:

  • moving through a multi-page public workflow;
  • maintaining a cart or other short-lived site state;
  • reproducing an issue from one residential perspective;
  • comparing a sequence of localized responses without changing the exit halfway through.

Use a distinct, non-sensitive session ID for each logical workflow. Do not put customer data, email addresses, or internal secrets in the identifier.

An IP address is only one part of a web session. Cookies, authorization headers, browser storage, user-agent behavior, and request order can all affect continuity.

A sticky proxy session does not automatically preserve application cookies. Your HTTP client still needs a cookie jar when the workflow depends on cookies. The reverse is also true: keeping cookies while unexpectedly rotating exits can create a mismatch that some sites treat as unusual.

Think of the layers separately:

  1. The proxy session controls the residential exit.
  2. The HTTP client controls cookies and connection reuse.
  3. Your application controls workflow state and retry behavior.

A simple decision framework

Choose automatic rotation when a request can be retried independently and no later step depends on the same network identity. Choose a sticky session when several steps form one transaction or observation.

Ask these questions before implementing either mode:

  • Would changing IPs between step one and step two invalidate the result?
  • Can this request be repeated without changing data or causing a duplicate action?
  • Does the destination associate the workflow with both cookies and source IP?
  • How should the application recover if the selected residential device disconnects?

If the first answer is yes, start with a sticky session. If every request is independent, rotation usually keeps the design simpler.

A safe integration pattern

Keep proxy policy close to the job definition instead of burying it in one global HTTP client. A queue worker can label jobs as independent or continuous, then build the corresponding proxy credential at execution time.

For a continuous job, generate one session ID and use it through the workflow. If the session fails because its Packeter disconnects, stop and decide whether the entire workflow is safe to restart with a new ID. Do not automatically swap exits in the middle of a stateful sequence.

For independent jobs, allow a new connection to select an exit and make retries bounded. Rotation should support a responsible request strategy, not replace rate limits, caching, or respect for a site’s terms.

Combine country targeting when location matters

Country targeting and session behavior can be combined in the auth key. PacketStream recommends two-letter ISO country codes:

AUTH_KEY_country-US_session-catalog42

If no exit is available in the selected country, the request fails instead of silently falling back elsewhere. Treat that as an explicit availability result in your application.

The practical default

Start with rotating residential proxies for independent public-web requests. Add stickiness only around workflows that genuinely need continuity, scope each session to one job, and design a clear restart path.

That approach keeps the proxy behavior easy to reason about: rotate between independent units of work, remain sticky inside one unit, and never let an automatic retry quietly change the meaning of a result.