Operations

What is Session?

In proxy usage, a session is a span of requests that all exit through the same IP address. It begins when you open a connection or claim a session identifier, and it ends when that identifier's timer expires or the network reassigns the address underneath you. Session control is what separates rotating traffic from a continuous identity.

Most gateway providers expose sessions through the username field rather than a separate API. You send credentials shaped like user-country-us-session-a91f3, and the gateway maps that string to a slot in its routing table, handing every request carrying the same string to the same exit node. Change one character and you get a different address. Other providers assign a port per session, so port 10001 is one identity and 10002 is another. Both designs put the choice in the client configuration, which means any HTTP library that supports proxy authentication can drive it without extra code.

A session runs on two clocks. The provider's time-to-live decides how long the mapping between your identifier and the exit IP stays valid, commonly a few minutes on residential gateways and longer where you control the device. The underlying network keeps its own clock. A mobile address can change when the carrier's DHCP lease renews, when the modem reconnects, or when a tower hands the device to another gateway. Your session survives only while both clocks agree, so treat the duration you asked for as an upper bound.

Do not confuse the network session with the application session. A logged-in account is held by cookies and tokens; the proxy session only keeps the IP steady underneath all of that. Pairing them badly is the usual cause of surprise logouts. The cookie jar persists while the exit address jumps mid-checkout, and the site's risk engine sees one account arriving from two networks seconds apart. Bind one cookie store, one browser fingerprint and one exit IP together for the life of an identity.

Verify rather than assume. Call an IP echo endpoint at the start and end of a run through the same proxy string and compare the answers. If they differ, the session expired or the provider rotated you without saying so. Logging the exit address alongside every request costs almost nothing and turns a vague complaint about blocks into a timestamped moment where the address changed. For long jobs, checkpoint your state so a lost session resumes on a fresh IP instead of restarting the crawl.

Where you meet it

You meet sessions the first time a scraper works fine on read-only pages and falls apart the moment it has to log in. The answer is holding one address steady rather than adding more of them. In practice you pick a session length per task, seconds for search result pages and tens of minutes for account work, then encode that choice in the proxy username or the port you dial. Getting it wrong shows up as random 403s and repeated re-authentication prompts.

Common questions

How long does a proxy session last?

It depends on the provider and the network underneath. Residential gateways commonly cap sessions somewhere between a minute and half an hour, while mobile lines where you control rotation can hold an address for hours. Whatever the published maximum says, the carrier or the device can end a session earlier, so build for an early end.

What is the difference between a session and a sticky session?

A session is the general idea of requests sharing one exit IP. A sticky session is the specific feature you switch on to keep that address for a stated duration. Rotating configurations use sessions too; theirs last a single request before the gateway picks a new address for the next one.

Why did my exit IP change in the middle of a session?

Either the provider's session timer ran out and the gateway reassigned you, or the underlying line changed address through a DHCP lease renewal, a modem reconnect, or a tower handoff on mobile. Logging the exit IP with each request tells you which, since a timer expiry lands on a predictable boundary.

Related terms

Sticky Session
A sticky session is a proxy configuration that pins your traffic to one exit IP for a fixed window instead of rotating on every request. You request it through a session identifier in the username or through a dedicated port, and the gateway routes each matching request back to the same node until the timer runs out.
IP Rotation
IP rotation is the practice of changing the outbound address a client uses, on every request, on a timer, or on demand. It spreads traffic so no single address builds up enough volume to be rate limited or banned, and it is the defining behaviour of rotating and backconnect proxy services.
Proxy Pool
A proxy pool is the set of IP addresses a provider can route your traffic through. Its usefulness comes from composition as much as from size: how many distinct subnets and autonomous systems it spans, how many countries it reaches, how heavily each address is reused, and how clean those addresses look to the sites you target.
Geotargeting
Geotargeting is choosing which country, region, city or carrier your proxy traffic exits from, so a site sees a visitor located where you want. You select it through parameters in the proxy username, a country-specific hostname, or a dedicated port, and the site reads that exit IP against whichever geolocation database it uses.
Geo-Restriction
Geo-restriction is a service limiting access or content by the visitor's apparent location. The site maps the client IP to a country through a geolocation database, then blocks the request or quietly swaps in a regional catalogue with local pricing. Content licensing, sanctions rules, tax registration and commercial strategy are the usual reasons.
Concurrent Connections
Concurrent connections are the number of proxy connections open at the same moment, counted across your workers rather than over a period. It is a capacity limit, separate from requests per second and from bandwidth. Ten connections can carry thousands of requests an hour when each is short, or almost none when each holds a slow page open.
Backconnect Proxy
A backconnect proxy is a single hostname and port that fronts a pool of many IP addresses. The client keeps one connection string while the provider's gateway assigns a different exit IP per request, per session or on a timer. Rotation and pool health checks happen upstream, where the client cannot see them.

Real 4G/5G mobile and residential IPs

PROXIES.SX runs carrier IPs in 100+ countries with HTTP and SOCKS5 on every endpoint. $4/GB down to $2.40/GB at volume, free endpoints and rotation, and your GB never expire.