All locations active · 99.99% uptime
Network Technology

How Does the Gateway (Backconnect) Architecture Work?

When you buy a residential proxy you are not given a list of thousands of IP addresses. You usually get a single address: gateway.saglayici.com:8000. Even so, you see a different exit IP on every request. This architecture is called backconnect gateway and almost all modern proxy services work this way.

In this article we cover the inner workings of the gateway, how session routing is done and how it differs from the direct IP model.

The Basic Idea

The gateway is a fixed entry point that you connect to. Behind it sit thousands of exit nodes. You send a request to the gateway, the gateway forwards the request to an exit node selected from the pool, and carries the response back to you.

FIGUREBackconnect gateway architecture
TOPOLOGYYour clientconnects to a single addressSession managerkey → node mappingTR exit nodesthousands of addressesDE exit nodesthousands of addressesUS exit nodesthousands of addressesHealth monitoringweeds out dead nodesGatewaysingle entry point

There is a single address in your configuration; all of the complexity is managed behind the gateway. This radically simplifies the client side.

Three Ways to Instruct the Gateway

You need to tell the gateway which country the exit will be made from and with which session ID. Three methods are used in the industry:

FIGUREHow are gateway parameters passed?
METHODEmbedding in the usernamemusteri-country-tr-session-a1A single address and a single port is enoughRequires no code changesA typo silently changes behaviourThe most common methodPort-based selectiongateway:10001 → session 1gateway:10002 → session 2Credentials stay the sameThe port range must be documentedPractical with simple clients

The third method is an API call: the session is created via the API first, and you connect with the returned ID. It is flexible but requires an extra round trip.

We showed the method of embedding parameters in the username in our authentication article in detail.

A Request's Journey Inside the Gateway

FIGUREThe stages of a request passing through the gateway
LIFECYCLE01Identityverification~2 msUsername/passwordor whitelist02Parameterparsing~1 msCountry, session,TTL are read03Node selection~3 msA suitable exit fromthe healthy pool04Forwarding to the exitvariableThe actual network latency is here05Carrying the responsevariableBack through the gatewaytotal duration →

The gateway's own processing time is typically a few milliseconds. Most of the total latency comes from the distance between the exit node and the target.

Latency note

The gateway model inherently adds an extra hop: you → gateway → exit → target. Compared with the direct IP model, an extra 10–40 ms of latency is normal. In return, pool management, health checks and rotation are taken off your hands entirely.

Comparing the Gateway and Direct IP Models

FIGUREComparison of the two delivery models
COMPARISONGateway (backconnect)Direct IP listConfigurationSingle addressList management requiredPool managementAt the providerOn your sideHealth checksAutomaticYou set them up yourselfLatencyOne hop moreThe shortest pathIP predictabilityLowFull controlWhitelist suitabilityDifficultEasyTypical useResidential, mobileISP, datacenter

If you need to register your own IP with the target system (whitelist, API access), the direct IP model is mandatory; with a gateway this is not possible because the exit IP is variable.

For scenarios that require a static IP ISP proxy and datacenter proxy our products work with the direct IP model.

The Inner Mechanics of Session Routing

The gateway must ensure that requests arriving with the same session key go to the same exit node. It does this with a mapping table:

FIGUREThe life of a session key inside the gateway
SESSIONNEWassign nodethe key was seenfor the first timeBOUNDrequests flowingkey → nodemappedTTL ENDthe mapping is deletedtime expiredAGAINa new node is assignedIf the node goes down, reassignment happens without waiting for the TTL

This is why a sticky session is "best effort" rather than a "guarantee": if the assigned node drops off the network, the gateway is forced to switch to a new node.

Advantages and Limits of the Gateway Model

Advantages

  • Client-side configuration comes down to a single line.
  • Pool health, dead IP removal and rotation are handled by the provider.
  • Geographic targeting changes instantly with a parameter.
  • Access to millions of IPs from a single address.
  • No code changes are needed when scaling.

Limits

  • Slightly higher latency because of the extra hop.
  • The exit IP is unpredictable — a whitelist cannot be set up.
  • The gateway is a single point of failure.
  • You cannot know in advance which IP will be used.
  • Debugging becomes more abstract.

Debugging While Using a Gateway

To be able to answer the question "which exit node produced this error" when a problem arises, you need to log the exit IP of every request. Otherwise you cannot set up target-based quarantine and cannot report problematic nodes to the provider.

FIGURERecords to keep when using a gateway
LOGSession keyWhich key the request was sent withExit IPFrom the response header or a check requestTarget and status codeFor the 403/429 distributionLatency (ms)For calculating p50/p95Requested countryTracking targeting accuracyAttempt numberTo see the cost of retries

Finding out the exit IP on every request is costly. The practical solution: send one check request for each new session key and tag the IP to that session.

Geographic Targeting and Gateway Location

The physical location of the gateway directly affects latency. If you are working from Turkey and using a European exit, choosing a gateway located in Europe markedly reduces the total time.

FIGUREThe effect of gateway location on latency
ROUTETRIstanbul (you)0 msDEFrankfurt gateway38 msDEGerman exit node52 msDETarget server61 msIf the gateway and the exit node are in the same region, the cost of the extra hop drops to a few milliseconds; if they are on different continents it can exceeda hundred milliseconds.

If your provider offers multiple gateway locations, choose the one closest to your target audience. For location options see our locations page .

Summary

Gateway architecture lets you reach millions of IPs through a single address; it hands the complexity of pool management, health checks and rotation over to the provider. In return you accept one hop of latency and a loss of control over the exit IP. For jobs that require a whitelist or target the lowest possible latency, the direct IP model is the right choice; for jobs that require flexibility and geographic breadth, the gateway model is. To verify your configuration proxy checker tool you can use.

Frequently Asked Questions

01How do I find out my exit IP when using a gateway?

Send one request per session to a neutral IP reflection endpoint and tag the returned address to that session. Querying on every request is inefficient in terms of both quota and time.

02Why is the gateway model slower?

Traffic goes from you to the gateway, from there to the exit node, and from there to the target. In the direct IP model there is one intermediary fewer. The difference is typically 10–40 ms and shrinks when the gateway and the exit are in the same region.

03Can I add the gateway address to an IP whitelist?

If you need to whitelist on the target system, the gateway model is not suitable; because the address the target sees is the constantly changing exit IP. In this scenario you need an ISP or datacenter proxy with a static IP.

04Can I use the same session key in two different processes?

Technically yes; both are routed to the same exit node. However, this doubles the request density on that node and increases the risk of rate limiting.

05What happens if the gateway goes down?

Because it is a single entry point, all of your traffic stops. In critical operations, defining a second gateway address (a backup region, if available) or a second provider significantly improves resilience.

Related Articles and Pages

NEXT STEP

Strengthen your proxy setup today.

Get started in minutes with a paid plan, or try our free proxy list first.

FREEPROXY.TR

Looking for a free proxy? You're in the right place

A complete proxy platform where you can browse up-to-date free proxy addresses, compare HTTP and SOCKS proxy types, and check your proxy connections with free tools.