← Back to blog
ROUTING nodetonet.com

How Nodetonet picks a device — least-connections, round-robin, and eligibility

N Nodetonet Team
May 3, 2026 7 min read

Every time a new connection lands on a rotating Nodetonet proxy, the router has to decide which device in the pool will handle it. The decision happens in milliseconds and is invisible to the client — but if you are tuning a pool or debugging why one phone seems overloaded while another sits idle, knowing what the algorithm actually does is essential.

TL;DR: Nodetonet uses a two-rule cascade — least-connections first, then round-robin to break ties — applied only to devices that pass a strict eligibility check. Sticky sessions short-circuit the picker entirely for returning clients.

Why a two-rule picker instead of pure random?

Pure random selection is simple but produces uneven load over short time windows, especially with heterogeneous pools where one device has a faster uplink or lower latency than another. A naive round-robin distributes evenly on paper, but it ignores in-flight load — sending request number three to a device that is already juggling twenty connections.

The combined least-connections + round-robin approach solves both: least-connections tracks real load, and round-robin provides a clean, fair tiebreaker when multiple devices happen to share the lowest count. This is the same principle used in production HTTP load balancers and works equally well whether your pool has two phones or two hundred.

Rule 1 — least-connections wins

When a connection arrives at a backconnect endpoint bound to a token group, the router queries each eligible device for its current in-flight connection count. The device with the lowest count wins the next connection.

This matters more than it looks. Consider a pool of three phones where phone A is on a fast LTE connection processing ten concurrent scraping threads, and phones B and C are nearly idle. Least-connections will naturally send the next burst to B and C, keeping A from saturating and degrading the pool for everyone. It absorbs bursty workloads and heterogeneous hardware without any manual weight configuration.

Rule 2 — round-robin breaks ties

What if several devices are tied at the same count? Pure least-connections with no tiebreaker would always pick the first eligible device, starving the others. Nodetonet avoids this by keeping a per-group cursor that advances every time a tie must be broken:

pool = [phone-A, phone-B, phone-C]   # all idle, 0 connections
cursor = 0

request 1 -> phone-A   (cursor advances to 1)
request 2 -> phone-B   (cursor advances to 2)
request 3 -> phone-C   (cursor advances to 0)
request 4 -> phone-A   (cursor advances to 1)
...

Under light load — for example, when you first bring a pool online — traffic fans out evenly. Under heavy load, least-connections takes over and the cursor only matters at the margins. The two rules complement each other perfectly.

How the two rules compare at a glance

Scenario Primary rule triggered Effect
All devices idle (0 connections) Round-robin tiebreaker Even distribution across the pool
Devices at different load levels Least-connections Underloaded devices absorb new traffic
Some devices tied at same count Round-robin tiebreaker on the tied subset No starvation within the tied group
Sticky session present Session map lookup (bypasses picker) Returns directly to bound device
All devices ineligible No selection possible Connection refused with a clear error

Eligibility — what qualifies a device

The picker only considers devices that pass an eligibility check first. A device is silently excluded from selection if any of the following is true:

If every device in the group fails the eligibility check simultaneously, the incoming connection is refused immediately at the proxy listener with a descriptive error — it is never silently queued. This fail-fast behaviour is intentional: a stalled connection that never resolves is harder to debug than a clear refusal.

If you are seeing frequent eligibility failures, check the per-device traffic charts on your rotating proxy dashboard and cross-reference with the proxy checker to confirm which devices are genuinely online.

Sticky sessions — when the picker is bypassed entirely

The least-connections + round-robin picker only runs for connections that carry no session identifier. As soon as the proxy username contains a -session-XXXX suffix, the router performs a fast map lookup instead:

This design keeps sticky sessions lightweight. The hot path is a single in-memory map lookup; the picker is only involved on the very first request of each session. For a detailed walkthrough of session mechanics, see sticky sessions explained.

The tradeoff is that a pinned device can accumulate more connections than its peers for the duration of the session. If you use very long TTLs with many concurrent sessions, monitor the per-device spread to make sure the pool does not tip out of balance. Token groups with automatic failover will re-pin a session to a different device if the original goes offline mid-session.

Reading pool behaviour from your traffic charts

Open any rotating proxy bound to a token group and check the per-device traffic split. Here is how to interpret what you see:

For deeper investigation, the proxy checker tool lets you test a specific endpoint and see which device IP is returned, so you can confirm the picker is selecting the devices you expect. If you need to verify carrier or geo targeting on top of load balancing, see geo-targeting for username modifier syntax.

Upstream forwarding and the picker

If your token group is configured with upstream residential forwarding, the picker still selects a device first — the selected device's outbound connection then chains to the upstream provider. The eligibility rules and the two-rule cascade apply identically; the upstream layer is transparent to the selection algorithm.

Building the right pool for your workload

The algorithm works best when the pool has devices with similar uplink quality and connection budgets. Mixing a phone on weak 3G with several phones on solid 5G will cause the 3G device to accumulate connections more slowly, which can temporarily make it look "cheapest" to least-connections during bursts. You can isolate low-quality devices into a separate token group and route only lower-priority traffic there.

For guidance on pool sizing, failover configuration, and creating token groups from scratch, see token groups — creating pools and set up a rotating mobile proxy from scratch. If you are managing a large fleet, bulk operations for 100+ proxies covers how to configure and monitor at scale.

Least-connections does the work. Round-robin makes it fair. Eligibility keeps you out of trouble.

Get started

Ready to build your own rotating pool? See how mobile proxies work on Nodetonet, or create a free account and set up your first token group in minutes. Questions? Reach us at support@nodetonet.com or join the community on Discord.

Frequently asked questions

What algorithm does Nodetonet use to pick a device from a pool?
Nodetonet uses a two-rule cascade: least-connections first (the device with the fewest active connections wins), then round-robin as a tiebreaker when multiple devices share the same count. This balances real load while keeping distribution fair during light traffic.
Why does one device get much more traffic than the others in my pool?
The most common cause is that the other devices are repeatedly failing the eligibility check — they may be offline, in ERROR state, or mid-rotation. The picker then falls back to the one device that does pass. Check the per-device traffic chart on your rotating proxy dashboard and inspect agent connectivity on the underutilised phones.
Does a sticky session bypass the least-connections picker?
Yes, completely. If the proxy username includes a -session-XXXX suffix, the router performs a map lookup for the existing session binding and routes there directly, regardless of load. The picker is only consulted when a session does not yet have a binding or its TTL has expired.
What happens if every device in the pool is offline or ineligible?
The connection is refused immediately at the proxy listener with a clear error message. Nodetonet does not silently queue connections — fail-fast is intentional so you can detect pool problems quickly rather than debugging a stalled request.
Why is a device temporarily removed during IP rotation?
When a sticky session TTL expires, the device must drop and re-establish its mobile data connection to obtain a fresh IP. This takes roughly five to fifteen seconds. During that window, routing new traffic to the device would hit a broken radio state, so it is excluded from the pool until reconnection completes.
How do I verify which device the picker selected for my request?
Use the proxy checker tool at /tools/proxy-checker — enter your proxy endpoint and it shows the exit IP returned. Cross-reference that IP with the device list on your dashboard to confirm which phone handled the request. You can also use the What is my IP tool to inspect ASN and carrier details.
N

Nodetonet Team

Building Nodetonet — a prepaid proxy + tunneling platform that replaces ngrok, Cloudflared and a residential proxy provider with a single panel.

Related posts