No KYC — no ID, no selfie, no documents · Paid in crypto · City targeting on every plan
Language: English
Get started

Guide · Sessions

Sticky residential proxy by city

A city check often takes several requests: a home page, a product, a delivery slot. A sticky session keeps them on one home IP in that city, for the time you choose.

Last updated: · 6 min read

Quick answer

How do I keep the same city IP for several requests?

EuroCity Proxies sticky sessions keep one exit IP for up to 30 minutes (the IP can change earlier, for example if the residential device goes offline). Add -session-<id>-ttl-<minutes> to a city username, for example USERNAME-country-fr-city-lyon-session-lyon1-ttl-10. As of October 2026, the ttl can be set up to 30. Use one session id per city and per task.

How do rotating and sticky usernames differ?

ModeUsername exampleExit IP behaviourGood for
RotatingUSERNAME-country-pl-city-krakowA new connection usually gets a different IP in the cityIndependent page loads, one per connection
Sticky, 10 minutesUSERNAME-country-pl-city-krakow-session-krk1-ttl-10Same IP for up to 10 minutes, even across new connectionsA short check: a page, two clicks, a screenshot
Sticky, 30 minutesUSERNAME-country-pl-city-krakow-session-krk2-ttl-30Same IP for up to 30 minutesA longer test of your own site, such as a checkout in test mode

What does a sticky session do?

A sticky session ties a session id to one exit IP for a set time. Every connection that uses the same username, including the same id, leaves through that IP until the ttl runs out. The IP can change earlier, for example when the home device behind it goes offline.

Without a session id, the gateway works in rotating mode. Each new connection gets an IP from the pool, usually a different one; to get a new IP on every request, send one request per connection (turn off keep-alive). Rotation suits independent requests. A sticky session suits a sequence seen as one visitor from one place. An example is a store that keeps your delivery area in a cookie.

Sessions keep the city you chose on the city list; combine them with ASN targeting and check the exit with the proxy city checker. Plans are on the pricing page.

Why use one session per city and per task?

Because each task then has a clear start, a known exit and a clean end. Name the id after the city and the task: lyon1 for the first Lyon check, krk2 for the second Kraków check. Session ids take 1 to 32 letters or digits.

This keeps results readable. When a Lyon page looks wrong, you know which exit served it and can check that IP. It also stops one long-lived session from mixing several checks, cookies and carts on the same address. When a task ends, close its client and start the next task with a new id.

Should I choose ttl-10 or ttl-30?

Choose the shortest ttl that covers the task: ttl-10 for most checks, ttl-30 only for long flows. A check of a city page, a product and a delivery slot usually fits in ten minutes. A test of your own checkout, with forms and a payment step in test mode, may need thirty.

Do not plan on the full ttl. Read the exit IP at the start and at the end of the task. If it changed, the device went offline; repeat the task once with a new id. The maximum is 30 minutes, so split longer work into several tasks.

How does keep-alive change the exit IP?

Keep-alive holds one connection open, and one connection keeps one exit. HTTP/1.1 connections are persistent by default under RFC 9112, so clients reuse them unless told to close.

  • requests: a Session reuses connections from its pool. The Requests documentation describes keep-alive as automatic within a session.
  • httpx: a Client keeps its connections open in the same way.
  • undici (Node.js): an idle socket stays open for 4 seconds by default (keepAliveTimeout), longer if the server sends a keep-alive hint.

With a sticky session this does not matter: the id keeps the IP even on a new connection. With a rotating username it does. Requests sent over one open connection share one exit. For a new IP per request, close the connection or open a new client each time.

One sticky session per city and per task (Python 3.9 or newer)
# pip install requests
from urllib.parse import quote

import requests

HOST = "gw.eurocityproxies.com"
PORT = 7777
PASSWORD = quote("PASSWORD", safe="")


def session_for(country: str, city: str, task: str, ttl: int = 10) -> requests.Session:
    user = f"USERNAME-country-{country}-city-{city}-session-{task}-ttl-{ttl}"
    proxy = f"http://{user}:{PASSWORD}@{HOST}:{PORT}"
    s = requests.Session()
    s.trust_env = False  # ignore HTTP_PROXY / HTTPS_PROXY set on your machine
    s.proxies = {"http": proxy, "https": proxy}
    return s


def exit_ip(s: requests.Session) -> str:
    return s.get("https://ipinfo.io/json", timeout=30).json()["ip"]


tasks = [("fr", "lyon", "lyon1"), ("pl", "krakow", "krk1"), ("nl", "the_hague", "hag1")]
for country, city, task in tasks:
    with session_for(country, city, task) as s:
        start = exit_ip(s)
        page = s.get("https://YOUR-SITE.example/", timeout=30)
        end = exit_ip(s)
        note = "same exit" if start == end else "exit changed: repeat once with a new id"
        print(city, start, page.status_code, note)

Can sessions get around a site's rate limits?

No. Sessions and rotation choose where your requests come from; they do not change what a site allows. Run one session per city and per run, at a modest rate. Rotation is not a way around a site's rate limits.

If a page fails, wait and retry once later. If the site keeps refusing, stop and use its official route, such as an API or a data partner. The Acceptable Use Policy lists what the service may not be used for.

How much traffic do sticky sessions use?

A session costs nothing by itself: you pay only for the data sent and received. Usage counts all data sent and received through the proxy (upload and download, headers included). 1 GB = 1,000,000,000 bytes. Connection attempts that fail before reaching the target are not counted. A short city check with one page and two IP lookups usually uses a few megabytes or less, depending on the page.

Traffic is shared across all cities and sessions of your account. Prepaid residential and rotating-mobile traffic never expires: unused GB stay on your account until you use them. Plans start at $0.95 for 1 GB on the pricing page.

Sticky sessions: questions

What is the longest sticky session?

Thirty minutes. Set -ttl-30 in the username. The IP can still change earlier if the home device behind it goes offline. Read the exit IP at the start and end of each task.

How do I get a new IP in the same city?

Change the session id, for example from lyon1 to lyon2, and keep the rest of the username. With a rotating username, open a new connection instead.

Can two scripts share one session?

A session is identified by its username, id and ttl, so two scripts that send exactly the same values ask for the same sticky session. Check the exit IP in each script before relying on it, and use separate ids for separate tasks.

Does a sticky session keep the same city?

Yes. The city is part of the username, and the session keeps one exit IP from that city's targeting. City availability varies; the checkout shows what is online.

Why did my IP change after two minutes with ttl-10?

Home connections go offline: a router restarts, a device sleeps, a provider reassigns an address. The session then gets a new exit. Repeat the task once with a new id; if it happens on every task, write to support with times and IPs.

Do sticky sessions cost more than rotating ones?

No. Both use the same per-GB traffic. Country and city targeting on every plan; in the United States also state and ZIP code; ASN targeting at no extra cost. City availability varies.

Sources (5)
  1. RFC 9112 HTTP/1.1, section 9.3 Persistence — IETF (June 2022, checked 2026-10-18)
  2. Requests: Advanced Usage, Session Objects and Keep-Alive — Requests (checked 2026-10-18)
  3. undici Client: keepAliveTimeout (default 4e3 ms) — Node.js project (checked 2026-10-18)
  4. HTTPX: Proxies — Encode (checked 2026-10-18)
  5. IPinfo JSON endpoint — IPinfo (checked 2026-10-18)

1 GB $0.95 · no KYC

Get started