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.
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:
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
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.
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
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:
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.
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.
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.