The essential points from this guide -- each one is explained in detail below.
Track success rate, latency, error rate, and bandwidth as the four core proxy performance metrics.
Set alerts for success rate drops below 90% and latency spikes above 10 seconds.
Log every request with proxy, status, latency, and response size for post-hoc analysis.
Run automated health checks against a known endpoint (like httpbin.org/ip) on a schedule.
Compare actual performance against your provider's SLA to hold them accountable.
Four metrics give you a complete picture of proxy performance. Success rate is the percentage of requests that return the expected content (not just a 200 status -- a 200 with a CAPTCHA page is a failure). Response latency measures time-to-first-byte through the proxy, including proxy authentication, connection establishment, and the target server's response time. Error rate by type breaks down failures into proxy infrastructure errors (502, timeouts) versus target-site blocks (403, 429, CAPTCHA), which require different remediation. Bandwidth tracks total data transferred, which directly impacts cost for usage-based proxy plans.
A healthy proxy setup shows >95% success rate, <5 second average latency for residential proxies (<1 second for datacenter), and zero sustained 407 errors. If your success rate drops below 90%, investigate whether the issue is proxy quality (infrastructure errors) or target-site detection (blocks and CAPTCHAs).
Create a lightweight monitoring pipeline that logs every proxied request and aggregates metrics for dashboards and alerts. The pipeline has three stages: per-request logging, periodic aggregation, and threshold-based alerting.
import time
import json
from collections import defaultdict
from dataclasses import dataclass, field
@dataclass
class ProxyMetrics:
window_start: float = field(default_factory=time.time)
total_requests: int = 0
successful_requests: int = 0
total_latency: float = 0.0
errors_by_type: dict = field(default_factory=lambda: defaultdict(int))
bytes_transferred: int = 0
def record(self, success: bool, latency: float, response_size: int, error_type: str = ''):
self.total_requests += 1
self.total_latency += latency
self.bytes_transferred += response_size
if success:
self.successful_requests += 1
elif error_type:
self.errors_by_type[error_type] += 1
def summary(self) -> dict:
rate = self.successful_requests / self.total_requests if self.total_requests else 0
avg_lat = self.total_latency / self.total_requests if self.total_requests else 0
return {
'success_rate': round(rate * 100, 2),
'avg_latency_ms': round(avg_lat * 1000),
'total_requests': self.total_requests,
'bandwidth_mb': round(self.bytes_transferred / 1_048_576, 2),
'errors': dict(self.errors_by_type),
}Aggregate metrics in 5-minute windows and write summaries to a log file, database, or monitoring service. This gives you both real-time visibility and historical trend data for capacity planning.
Run periodic health checks against a known endpoint to verify your proxy setup is working before scraping jobs start. This catches configuration issues, expired credentials, and provider outages before they waste time on failed scraping runs.
import requests
import time
def health_check(proxy_url, timeout=15):
"""Verify proxy is working by checking IP against httpbin."""
start = time.time()
try:
response = requests.get(
'https://httpbin.org/ip',
proxies={'https': proxy_url},
timeout=timeout,
)
latency = time.time() - start
if response.status_code == 200:
exit_ip = response.json().get('origin', 'unknown')
return {'status': 'healthy', 'exit_ip': exit_ip, 'latency_ms': round(latency * 1000)}
return {'status': 'degraded', 'code': response.status_code, 'latency_ms': round(latency * 1000)}
except requests.exceptions.Timeout:
return {'status': 'timeout', 'latency_ms': round((time.time() - start) * 1000)}
except Exception as e:
return {'status': 'error', 'message': str(e)}
# Pre-flight check before scraping
result = health_check('http://USER:PASS@gw.knoxproxy.com:7000')
if result['status'] != 'healthy':
raise RuntimeError(f'Proxy health check failed: {result}')Run health checks at the start of every scraping job, on a cron schedule (every 5-15 minutes), and after any configuration change. Compare the exit IP against expected geo-targeting to verify the proxy is routing to the correct region.
Define alerting thresholds based on your operational requirements and your proxy provider's SLA. Typical thresholds for residential proxy scraping: success rate below 90% triggers a warning, below 80% triggers a critical alert. Average latency above 10 seconds triggers a warning, above 20 seconds triggers a critical alert. Any sustained 407 errors trigger an immediate critical alert since they indicate credential issues.
Track your provider's actual performance against their advertised SLA. Keep a rolling 30-day record of success rate, uptime, and latency. If actual performance consistently falls below the SLA, use this data when negotiating with your provider or evaluating alternatives.
KnoxProxy's dashboard provides real-time metrics for your account, including bandwidth usage, request counts, and success rates by geo-target. Compare your client-side metrics with the provider dashboard to identify whether failures originate from the proxy infrastructure or the target sites. Discrepancies between the two often reveal issues in your client code rather than proxy quality.
Ready to put this into practice? Test your proxy
KnoxProxy Research Team · Technical Content
Network engineers and proxy infrastructure specialists with 10+ years in anti-bot systems, web scraping, and IP routing.
90.4M+ ethically sourced residential IPs across 195 countries. Start free -- no credit card required.