Disclosure up front: I run IPYE, a company that leases IP space. This is a practical how-to, and IPYE comes up where it helps, with a short call to action at the end.

Proxy addresses don't fail all at once. A few start getting CAPTCHAs on one site, then 403s on another, then a blocklist picks up the /24. If you only notice when jobs start failing, you've lost days. A small dashboard that tracks success rates per address and per site, plus a daily blocklist check, shows the trend early. This guide builds one for a pool you control, such as a /24 from IPYE. The examples use the documentation prefix 203.0.113.0/24.

What to measure

For every request, record:

  • The outbound address used.
  • The target host.
  • The HTTP status.
  • Whether the body looked like a block page or CAPTCHA (check for known markers).
  • The response time.

Then aggregate per address and per host over 5-minute windows.

Emitting metrics from the scraper

With the Prometheus Python client:

from prometheus_client import Counter, Histogram, start_http_server REQS = Counter('scrape_requests_total', 'Requests', ['src', 'host', 'outcome']) LAT = Histogram('scrape_latency_seconds', 'Latency', ['host']) def classify(resp): if resp is None: return 'error' if resp.status_code == 429: return 'ratelimited' if resp.status_code in (403, 401): return 'blocked' if 'captcha' in resp.text[:5000].lower(): return 'captcha' if resp.ok: return 'ok' return f'http_{resp.status_code}' start_http_server(9105) # after each request: # REQS.labels(src=src_ip, host=host, outcome=classify(r)).inc() # LAT.labels(host=host).observe(r.elapsed.total_seconds()) 

Keep label cardinality under control. 256 addresses times a few dozen hosts is fine, but don't label by full URL.

Useful queries

Block rate per host:

sum by (host) (rate(scrape_requests_total{outcome=~"blocked|captcha"}[15m])) / sum by (host) (rate(scrape_requests_total[15m])) 

Worst addresses on a host:

topk(10, sum by (src) (rate(scrape_requests_total{host="www.example.org",outcome=~"blocked|captcha"}[1h]))) 

Alert when a host's block rate goes above, say, 5 percent for 15 minutes. That's your signal to slow down on that site, not to rotate harder.

Daily blocklist check

Check every address against the main DNSBLs once a day, and export the result as a metric:

import dns.resolver LISTS = ['zen.spamhaus.org', 'bl.spamcop.net'] def listed(ip, zone): q = '.'.join(reversed(ip.split('.'))) + '.' + zone try: dns.resolver.resolve(q, 'A'); return True except (dns.resolver.NXDOMAIN, dns.resolver.NoAnswer): return False 

Run it from your own resolver. Some lists refuse queries that come through large public resolvers. A new listing is urgent, because it usually means something on your network is sending spam or attack traffic, not scraping.

Reading the patterns

  • One host, many addresses blocked at once: the site changed its defences, or your aggregate rate is too high. Slow down on that host.
  • One address blocked across many hosts: that address has its own problem. Check its history and what's been sent from it.
  • Gradual rise across the whole /24: a classification or reputation change at the range level. Check IP intelligence lookups and your own traffic mix.
  • CAPTCHAs only: often triggered by header or fingerprint inconsistencies, not by the IP. Check what your client sends.

Act on what you see

  • Lower per-host rates first.
  • Take a struggling address out of rotation for that host, and try it again later.
  • Fix the cause before adding addresses. More addresses with the same behaviour end up in the same state.

A range that's yours alone

Monitoring makes the most sense when the range's history is yours alone, with no unknown neighbours. You can lease a dedicated /24 from IPYE, with reverse DNS, a LOA and a ROA.

Next step

Add the counters to your scraper this week. When you need a dedicated pool, set it up in the IPYE portal.

About IPYE

IPYE leases IPv4, IPv6 and ASN space with instant setup. Your first IPv6 /48 is free for the first year, a real allocation you can announce on your own ASN, with a LOA from the portal and the ROA created automatically. IPv4 /24 to /22 leases include LOA, ROA and per-/24 rDNS, and ASN and region changes apply automatically. Locations: Los Angeles, New York, Ashburn, Salt Lake City, London, Amsterdam, Frankfurt. More at ipye.com. Questions: ipye@turnel.com.

Disclosure: I run IPYE