All systems operational HTTP · HTTPS · SOCKS5 Global network
Documentation home Quickstart Engineering guides Code examples Global network Pricing Solutions overview Custom proxy pools Managed data scraping Contact Console
ENGINEERING GUIDE

Diagnose proxy failures before you retry.

Separate client, DNS, TCP, TLS, proxy authentication, target response, parsing, and validation. The same visible failure can require very different action.

Proxy407Target403 / 429TransportTimeout / TLSPolicyBounded retry
01
FAILURE LAYERS

Classify before retrying.

Record the phase, target, proxy product, route policy, attempt, status, exception, and elapsed time.

DNS / TCPGateway cannot be reachedResolve host, firewall, network
TLSHandshake or certificate errorClock, CA, SNI, protocol
407Proxy authentication failedUsername, password, plan
403 / 429Target respondedAuthorization, rate, policy
02
RETRY BUDGET

Retry safe transient failures with jitter.

Retries must have a hard attempt limit, exponential delay, random jitter, and a reason recorded for each attempt.

import random
import time
import requests

RETRYABLE = {429, 500, 502, 503, 504}

for attempt in range(4):
    try:
        response = requests.get(url, proxies=proxies, timeout=(10, 30))
        if response.status_code not in RETRYABLE:
            response.raise_for_status()
            break
    except (requests.ConnectTimeout, requests.ReadTimeout):
        if attempt == 3:
            raise
    time.sleep(min(2 ** attempt + random.random(), 30))
03
TIMEOUTS

Use separate connect and read budgets.

A short connect timeout detects unreachable routes. A read timeout must allow the target and expected object size enough time without leaving workers blocked indefinitely.

Connect

DNS, socket, and proxy reachability.

TLS

Handshake and certificate verification.

Read

Time waiting for response data.

Job

Total deadline across attempts and processing.

04
OBSERVABILITY

Log enough context without leaking credentials.

Sanitize proxy URLs and never write passwords to logs. Keep route policy, not secret values.

Target host and request type
Product, country, pool, and SESSION identifier
Attempt number and retry reason
Status, exception class, and elapsed time
Response bytes and validation outcome
05
DEVELOPER FAQ

Questions before production.

Should a 407 rotate to another exit?

No. Fix credentials or plan access; changing exits does not repair authentication.

Are 403 and 429 proxy failures?

They are normally target responses. Review authorization, request behavior, and rate.

Should TLS verification be disabled?

No. Fix clock, CA, SNI, or certificate-chain problems instead.

Which requests are safe to retry?

Retry operations that are idempotent or explicitly protected by an idempotency mechanism.