Rotating vs Sticky Proxies and How to Test Your Session

A rotating proxy can assign different exit IPs. A sticky session asks for the same exit across several requests. Repeated IP checks help you confirm how your own endpoint implements rotation and session expiry.

Technician checking the ports on three server nodes with amber and blue Ethernet cables

What changes between a rotating proxy and a sticky session?

A proxy gateway is the address your app connects to. The exit IP is the address the destination sees. A rotating service can keep the gateway address constant while selecting an exit according to its policy. For one product the selection can occur when a connection opens. Another can assign by time window, port or request type. Check the exact trigger in your product’s documentation before you choose a test.

A sticky session asks the provider to keep an exit assignment for a documented period or condition. The provider might identify it with a parameter in the proxy username, a session-specific endpoint or another setting. A static assignment is intended to keep its address beyond a temporary session. In all three cases, verify the IP a destination reports even if the gateway name looks stable. An application login session has its own cookies and tokens, with a lifetime that can differ from the proxy session’s lifetime. BuyProxies guide to assignment models.

Test proxy rotation with fresh connections

Use a proxy you own or rent and a permitted IP lookup. The Bash example runs one cURL process per request. It prints the IP lookup body and a timestamp so you can compare successive connections. Replace the gateway with your endpoint. The snippet assumes a proxy without password authentication or one authorized by your source IP. If your provider requires credentials, configure cURL using its approved authentication method. See cURL proxy authentication examples.

lookup='https://testmyproxies.com/api/my-ip'
gateway='http://gateway.example:8080'

probe() {
  curl --disable --noproxy '' --proxy "$gateway" \
    --silent --show-error --fail \
    --connect-timeout 5 --max-time 12 \
    --write-out '\nstatus=%{http_code} connects=%{num_connects}\n' "$@"
}

for sample in 1 2 3; do
  printf '%s sample %s\n' "$(date -u '+%Y-%m-%dT%H:%M:%SZ')" "$sample"
  probe "$lookup" || break
  sleep 2
done

Read the ip field for each completed request. A sequence of 192.0.2.10, 192.0.2.88 and 192.0.2.10 would show two observed exits over three fresh connections. A rotating pool can select the same address again, so three identical results can also occur. Compare the sample window with the documented trigger and check that your account is using the intended gateway mode. A refusal or timeout leaves that sample without a verified exit. Read the exit IP and connection status.

Compare with requests over one reusable connection

Keep the variables and function in the same shell and ask one cURL process to fetch the same URL twice. cURL can reuse a live connection when the destination, proxy and other connection settings match and the server allows reuse. Inspect the connects count on both lines to see what happened. cURL connection reuse guide.

probe "$lookup" "$lookup"

On a clean run the first transfer normally shows at least one new connection. If the second shows zero new connections, cURL reused an existing connection for it. If both show a new connection, the second is another fresh-connection sample. A server may close a connection at the end of a response. An intermediary or an idle timeout can close it too. With HTTPS through an HTTP proxy, an established tunnel can keep carrying traffic to the same target across requests. Seeing the same IP in that tunnel tells you how that connection behaved. Repeat the fresh-connection test to learn about new assignments. cURL write-out fields.

Prove that a sticky session survives a reconnect

Use the provider’s documented sticky option and save the time of the first successful request. Repeat the three fresh connections with the same session setting on every request. Keep the target and geography options fixed. If the IP stays stable on separate connections within the documented window, you have observed continuity for that session. Record a label for the session and omit the real credential or session token when sharing results. Providers can differ in where they accept the session setting and how they count session time. Example of product-specific session controls.

Check whether your provider documents an absolute lifetime, an idle timeout or both. For an idle timeout test, stop sending requests during the waiting period. After the relevant interval, open one fresh connection and record the next IP or the error your provider returns. If the same address appears again, it could be the same assignment or a fresh selection of the same address. Use the provider’s session record when you need to distinguish those cases. A change before the stated limit can also reflect an unavailable exit, a changed session setting or a product-specific fallback.

Pick the behavior your workload can handle

For a permitted workflow that expects source IP continuity across related requests, measure a sticky or static assignment across the time your application needs, including reconnects. Write down what the app should do when an exit disappears and check whether it can safely repeat an interrupted operation. For an independent measurement on a service you control, rotating mode can help you sample how authorized requests look across exits. Compare results with the same time limits, target and sampling method. Measure proxy speed and success rate on a fixed test endpoint.

Keep destination permissions, account limits and site rules in force for either mode. A restriction response belongs with the rest of the test evidence. Check it with the destination operator or your provider and include the timestamp, expected behavior, gateway mode and observed IP. For a test in a browser profile, look up the exit from the profile that will make the request. Verify a browser proxy’s exit IP.

All proxy testing guides · Open the proxy tester