Skip to content
Nefo

Guides

Sticky Sessions Explained: How Sticky Proxies Work

By Nefo Team6 min read

Illustration of a laptop holding one steady connection to a single network node

What is a proxy session?

A "session" is simply a continuous interaction between your client and a target website that shares state — cookies, a login token, or the steps of a checkout flow. When your IP changes mid-flow, many sites treat it as a new, untrusted visitor and may reset your cart, log you out, or re-trigger verification.

A proxy session controls which exit IP your requests come out of and for how long that IP stays the same. This is the core knob that separates rotating from sticky behavior.

Rotating vs sticky proxies

Both modes draw from the same residential pool. The difference is IP lifetime:

  • Rotating: the network assigns a new IP on every request. Ideal when requests are independent and you want maximum IP diversity.
  • Sticky: the network keeps one IP assigned to your session ID for a chosen time, then releases it. Ideal when requests must look like one continuous visitor.
AspectRotatingSticky
IP lifetimePer request1 minute to 24 hours
Best forBroad crawling, price checks, SERP samplingLogins, carts, multi-step forms
State consistencyLow (state can break)High (state preserved)
IP diversityVery highLower during the window
Typical volumeMany small requestsFewer, longer flows

How long does a sticky session last?

Nefo lets you set the session lifetime from 1 minute up to 24 hours (1440 minutes). Shorter windows recycle IPs faster and suit quick tasks; longer windows keep continuity for slower, human-paced flows.

The lifetime is a best-effort target. A residential IP can drop early if the underlying device goes offline, so well-made clients handle re-assignment gracefully.

How to set up a sticky session

Sticky behavior is controlled through the proxy username and port. Rotating IPs use port 9000 (HTTP) or 11000 (SOCKS5). Sticky IPs use port 10000 (HTTP) or 12000 (SOCKS5) with a session token. A username might look like this (values are illustrative, not real credentials):

shell
USERNAME-country-us-city-losangeles-session-a8bd381f-lifetime-30
  • -country-us sets the country: United States
  • -city-losangeles sets the city
  • -session-a8bd381f is a session label you choose; reuse it to keep the same IP
  • -lifetime-30 holds the IP for 30 minutes

Keep the same session label across requests to stay on one IP; change it to get a new one. The session token only works on the sticky ports. Treat real session strings like passwords. For code samples, see the Python Requests guide and sticky session proxies.

When to use sticky proxies

Choose sticky when the task depends on continuity:

  • Multi-step flows — checkout, onboarding wizards, or paginated results tied to a cookie.
  • Shopping carts — add-to-cart and checkout that must occur from one apparent visitor.
  • Logins to accounts you are authorized to use — keeping a stable IP across an authenticated session reduces friction.
  • Consistent geography — verifying how a localized page renders from one city or state without the IP shifting mid-test.

When to use rotating proxies

Choose rotating for stateless, high-diversity work:

  • Broad public web-data collection — gathering many independent pages where each request stands alone.
  • Price monitoring at scale — sampling catalogs across regions.
  • Ad verification and SEO monitoring — checking how content appears from many vantage points.

Always collect only lawful, public data, respect each site's terms and robots directives, and rate-limit responsibly.

Key takeaways

  • A session is a continuous, state-sharing interaction; the proxy controls the exit IP and its lifetime.
  • Sticky means one IP for a set window (1 minute to 24 hours); rotating means a fresh IP per request.
  • Use sticky for logins, carts and multi-step flows; use rotating for broad data collection.
  • The lifetime is best-effort, so design clients that tolerate an early IP change.
  • Nefo supports both modes on one balance; see pricing to start from 5 GB for $4.50.

Frequently asked questions

On Nefo a sticky session can hold one residential IP from 1 minute up to 24 hours. You set the lifetime in the username. It is a best-effort target, so an IP can release early if the host device disconnects.

← All articles

Start with 5 GB. Keep what you don't use.

Residential bandwidth from $0.53/GB that never expires. Card, PayPal, Apple Pay, Google Pay, Alipay and crypto.