Health Monitoring Architecture

A proxy pool without monitoring degrades silently. Dead IPs accumulate, contaminated IPs remain in rotation, and your success rates drop without obvious cause. Three monitoring layers prevent this:

Passive Monitoring (Always On)

Track every request result per proxy: HTTP status code, response time, error type. Build a success rate per proxy per target domain. If a proxy's success rate drops below 90% on a target, mark it as degraded for that target. If it drops below 50%, quarantine it.

# Proxy health tracker (simplified)
proxy_stats = {}  # {proxy_id: {target: {success: N, fail: N}}}

def track(proxy_id, target, success):
    stats = proxy_stats.setdefault(proxy_id, {}).setdefault(target, {'success': 0, 'fail': 0})
    stats['success' if success else 'fail'] += 1
    
    total = stats['success'] + stats['fail']
    rate = stats['success'] / total if total > 10 else 1.0  # min 10 requests
    
    if rate < 0.5:
        quarantine(proxy_id, target)
    elif rate < 0.9:
        degrade(proxy_id, target)

Active Monitoring (Scheduled)

Every 60 seconds, run TCP healthchecks on each proxy: is port 8080 open? For proxy-level checks, send a HEAD request to a neutral target (httpbin.org or similar). Response within 5 seconds = healthy. Timeout = dead. This catches proxy processes that crash without notification.

Semantic Monitoring (Periodic)

Every 5 minutes per proxy, make a real request to your target domain and verify: HTTP 200, expected content present (e.g., check for a specific CSS class or JSON key), no CAPTCHA or block page detected. This catches IPs that are technically alive but blocked by your specific target.

Rotation Strategies

Round-Robin (Simple, Risky)

Cycle through all available IPs in order: IP1 → IP2 → IP3 → IP1... Simple to implement, predictable performance. Risk: sites detect the pattern — they see requests cycling through IPs at regular intervals with consistent headers. Human users don't do this.

Weighted Round-Robin (Recommended)

Assign weights based on success rate. An IP with 98% success gets weight 10. An IP with 80% success gets weight 3. Higher-quality IPs handle proportionally more traffic. Recompute weights every 1000 requests per IP.

import random

def weighted_choice(proxies):
    # proxies: [{id, success_rate, weight}]
    total = sum(p['weight'] for p in proxies)
    r = random.uniform(0, total)
    cumulative = 0
    for p in proxies:
        cumulative += p['weight']
        if r <= cumulative:
            return p

Sticky Sessions with Rotation Budget

Some scrapers need session persistence (logged-in scraping, multi-step workflows). Use sticky sessions: route the same user session through the same IP for its duration. Set a rotation budget: if IP fails 3 times in a session, rotate to a fresh IP and restart the session.

CGNAT Natural Rotation (ProxifyPRO)

ProxifyPRO's mobile proxies use carrier CGNAT — the IP changes naturally when the carrier rotates assignments, typically every few hours without any action. For explicit rotation, the PDP context reset (AT command) changes the IP in ~16 seconds. This natural rotation is undetectable because it matches real mobile user behavior.

// the sticky rotation paradox

Sticky sessions help avoid geo-inconsistency. But staying on the same IP for hours signals "this isn't a real user." The solution: use CGNAT rotation (carrier-level IP change without breaking the session cookie) to get a fresh IP while preserving session state. ProxifyPRO handles this automatically.

Geographic Distribution

For pools spanning multiple countries, partition by geography. When a request needs a US IP, route to the US proxy pool. This reduces latency (nearby server = faster response), improves geo-targeting accuracy, and prevents issues where a UK IP appears in US-only content.

Pool PartitionProxy CountUse Case
US - Residential500+US e-commerce, Google US SERPs
US - Mobile (AT&T/T-Mobile)20Instagram, TikTok, high-risk US
EU - Residential300+EU e-commerce, GDPR-required sites
APAC - Residential200+Regional content, APAC-specific
Global - Datacenter1000+Public APIs, unprotected sites

IP Scoring Systems

Build a composite score per IP per target domain. Factors: recent success rate (50% weight), average response time (20% weight), days since last burn (15% weight), IP age in pool (15% weight). IPs with scores above 80 go into the A-tier. 60-80: B-tier. Below 60: quarantine pending review.

Cost Optimization

  • Cull monthly: Remove IPs with 0 requests in 30 days — they're costing you in proxy provider fees
  • Tier by quality: A-tier IPs for high-value targets, B-tier for medium risk, datacenter for bulk low-risk
  • Track burn rate per target: If Target X burns 50 IPs/month, calculate cost and evaluate if the target is worth the burn rate
  • Cache aggressively: Don't re-request data you already have. Cache hits = zero proxy cost
  • Batch by domain: Crawl all pages from example.com before rotating IP — reduces total rotations needed

ProxifyPRO Pool Architecture

ProxifyPRO's self-hosted model simplifies pool management. Instead of managing a pool of external IPs, you manage a pool of physical dongles. Each dongle is an independent proxy with its own IP, rotation schedule, and health metrics. The ProxifyPRO dashboard shows health across all dongles in real time: signal strength, uptime %, current IP, last rotation time, and bandwidth used.

For marketplace providers, ProxifyPRO's SLA monitoring acts as an external healthcheck — the marketplace verifies your proxies every 5 minutes from an external vantage point, providing objective uptime metrics that renters can trust.