Skip to content
IP rotation

IP rotation and connection reuse

Depending on the proxy service implementation, an IP-change command may affect only new connections. An established TCP connection can remain open and continue on its previous path. Command acknowledgement and validation of the new egress are therefore separate events, and a reliable post-check opens a new connection.

2 min readReviewed and updated: August 6, 2026

Key points in one minute

  • A persistent connection can outlive a control-plane change.
  • A new route is validated with a new transport connection.
  • Forcing every request to close its connection is inefficient.
  • Rotation response and post-check result belong in separate records.

Why connection reuse exists

HTTP/1.1 and client libraries reuse connections to avoid repeating DNS, TCP, and TLS for every request. This reduces latency and load. It is a normal optimization, not evidence that a rotation command was ignored.

The control-command boundary

The exact rotation mechanism is platform-specific, but a safe contract reports command acceptance without promising to alter an in-flight stream. Before another command, the system waits for completion or exposes an explicit unknown outcome for reconciliation.

Independent post-check

After a successful response, create a new connection to a control service you operate. Compare the observed egress with the previous value and record the time. Do not use the connection IP of the proxy endpoint as proof of destination-facing egress; they are different hops.

Balancing accuracy and load

CURLOPT_FRESH_CONNECT is useful for a targeted post-check but hurts performance when applied universally. Normal traffic can use a connection pool, while a rotation action uses one new request with a bounded timeout and double-click protection.

Practical checklist

  1. 1Wait for the command result before post-checking.
  2. 2Open a new connection to your own control service.
  3. 3Compare previous and newly observed egress values.
  4. 4Do not automatically repeat an unknown command outcome.
  5. 5Force a fresh connection only where validation requires it.

Sources and documentation

This material is based on primary, official, and technical sources. The article is an original summary written for this knowledge base.

  1. 1.RFC Editor / IETF: HTTP/1.1
  2. 2.curl project: libcurl API overview
  3. 3.curl project: CURLOPT_FRESH_CONNECT

Continue reading

More articles on related topics

Step-by-step diagnostics

Proxy connection failed: diagnose the exact connection stage

Read

DNS and SOCKS5

DNS over SOCKS5: where the domain name is resolved

Read

Operations

DNS cache and TTL: why a new address is not immediate

Read