Try 25 MB of US mobile proxy data free for 30 days.Start free trial
November 30, 202612 min read

Scraper Uptime Design: Build for Data, Not Just Runs

Abstract platforms represent scraper uptime and data completeness

A scraper is up when correct, complete, fresh data reaches its destination on schedule. A process that is running, or a fetch that returns HTTP 200, proves none of that. Designing for uptime means defining the target in terms of data, splitting the system so one failure stays small, retrying only what deserves a retry, and giving the fetch layer an IP identity that sites treat as ordinary traffic. That last part is where we come in: our real US carrier IPs, with sticky and rotating sessions, remove one of the biggest sources of avoidable failures.

TL;DR

  • Define uptime as delivered, validated data inside an agreed freshness window, not as "the job ran".
  • Split the pipeline into stages joined by queues, with checkpoints, so a dead worker costs one item rather than a crawl.
  • Classify failures: retry transient ones with capped, jittered backoff, record terminal ones, and route blocks to a new session.
  • Alert on yield, row counts and last-success time, because a green fetch dashboard can hide an empty feed.
  • Use real carrier IPs with the right session type per target so blocks stop being your main source of downtime.

Table of Contents

Start with an uptime definition that matches the data

Most scrapers are monitored with the metric that is easiest to collect: did the process exit cleanly, and what share of requests returned 2xx. Both are fetch-layer signals. A pipeline can post 100% fetch success while a site template change leaves most price fields empty, and nobody is paged.

A better definition has four parts:

DimensionWhat it measuresFormula
AvailabilityDid scheduled runs finish and deliver?successful runs / scheduled runs
CompletenessDid you cover the scope you defined?entities collected / entities expected
FreshnessHow old is the newest good data?now minus last successful extraction
YieldAre the fields populated?populated required fields / expected fields

The freshness idea comes straight from site reliability engineering. The USENIX SREcon SLO workshop material defines a data-pipeline freshness indicator as the proportion of valid data updated more recently than a threshold. For batch jobs, time since the last successful run is a workable approximation. More accurate measurement tracks source or generation timestamps.

Two habits keep the numbers honest. First, keep failures in the denominator. Webtruffle's SLA guide points out that coverage is observed in-scope entities divided by expected in-scope entities, and that blending coverage and field completeness into one percentage can hide that only a small subset was collected. Second, measure at the consumer boundary. Edilec's pipeline SLO guide recommends checking when a complete, validated output becomes visible to the people using it, and reconciling delivered partitions or totals against what was expected.

Once you have an indicator, set a target and an error budget. In Google's SRE workbook, the error budget is 100% minus the SLO. A 99.5% target on 1,000 monthly checks allows five failures; that arithmetic is what lets a team decide whether to ship features or fix reliability. If you want a wider view of turning pipeline targets into enforceable commitments, this walkthrough of data pipeline SLAs is a good companion.

A worked example

Say you track 2,667 product URLs daily for a regional price comparison. One day 1,964 rows come back with a price. A dashboard dividing rows with price by rows written reads 100%. Divided by URLs attempted, it reads about 74%. Scrapewise's monitoring guide uses this exact case to show why the denominator must be the scope, not the output. The first number says the writer works. The second says the feed has a problem.

Attempted URLs compared with rows containing prices

Separate the pipeline into stages that fail independently

A monolithic script that discovers URLs, fetches, parses and writes is one bug away from total downtime. The fix is the same one distributed systems use everywhere: stages connected by queues, each able to restart on its own.

A workable layout has four layers:

  1. Queue: URL discovery, deduplication and priority.
  2. Downloader: sessions, proxies, timeouts and retries.
  3. Parser: extraction and validation against a schema.
  4. Storage and monitoring: persistence, metrics and alerts.

The patterns that make this resilient are well documented in a web crawler design walkthrough based on Designing Data-Intensive Applications:

  • Checkpoint before you acknowledge. Write the output of each stage to durable storage before telling the queue the message is done. A fetcher that dies mid-page never acknowledges, so the message reappears and another worker takes it.
  • Make writes idempotent. Queues redeliver at least once. Keying writes by normalized URL means a duplicate delivery overwrites rather than duplicates.
  • Use a dead-letter queue. After a fixed number of attempts, park the item with its last status and error instead of looping forever.

One more habit pays off during incidents: store raw HTML separately from parsed records. When a parser bug ships, you re-run extraction over stored documents instead of re-crawling and spending proxy bandwidth, and without hitting the target again. Our own write-up on scraping at scale and its nine components covers how to separate discovery from retrieval.

Keep workers stateless. If all durable state lives in the queue and the store, a crashed pod loses one item, and scaling up or down needs no coordination.

Handle failure by class, not by hope

Retries are the most common cause of self-inflicted outages. A blanket "retry three times on any error" turns a rate limit into a ban and a missing page into wasted spend. Sort failures first.

ClassExamplesAction
TransientTimeouts, connection resets, 429, 502, 503, 504Retry with exponential backoff and jitter, capped at a few attempts
Terminal404, 410, robots-disallowedRecord the result, never re-enqueue
Blocked403, CAPTCHA, a 200 page asking you to verify you are humanSwitch session or IP, do not hammer the same one

This three-way split follows the failure classes described in a large-crawl frontier design guide, which also asks for a dead-letter store holding last status, error and attempt count as the crawl's diagnostic surface.

Some rules that hold up in practice:

  • Honor Retry-After. When a server sends it with a 429 or 503 response, it tells you when the rate-limit window resets or the service expects to return. Use it instead of your computed delay.
  • Add jitter. Without it, a fleet that failed together retries together.
  • Budget the total time. Per-attempt timeouts multiplied by retries can leave one URL spending over a minute before it fails. Set a global deadline per item. We compare jitter strategies in our retry logic guide.
  • Use circuit breakers per domain. When a domain's error rate crosses a threshold, stop scheduling new jobs for it and let the session cool down. Probe with a single request, and judge the result by status code and content, because a block page can return HTTP 200.

Blocked responses deserve the most thought because they look like downtime but are really an identity problem. If you are seeing 403s, work through eight quick checks for 403 Forbidden before touching your retry settings. And because per-domain rate limits become the real throughput ceiling at scale, how rate limiting affects large-scale automation is worth reading before you add more workers.

Monitor the feed, not just the run

The failures that hurt are quiet ones: the job succeeds, the data is wrong. Monitoring needs two layers, job health (heartbeat, duration, exit status) and data health (item counts, field coverage, schema errors, status mix, freshness).

Signals worth wiring up first:

  • Last-success timestamp. A gauge of when the last good run completed, with an alert when the gap exceeds your window. This monitoring guide for Python scrapers notes it keeps working when the scraper stops entirely, whether the crawl failed, the scheduler died or the cron entry was deleted.
  • Transport errors versus block rate. DNS, TLS and timeouts point at your network or the target's. Refusals and poisoned content point at your identity or pacing. Merging them hides which problem you have.
  • Yield. Useful records per attempted request. It catches the case where HTTP success stays at 100% while the feed is empty.
  • Row-count deviation. Compare each source with its own recent history, for example against a rolling seven-day band, not a global threshold. A row count that slides week after week with zero errors is the typical silent failure.
  • Null rates on must-not-break fields. Price, stock, SKU: alert when a null rate doubles or a format stops validating.

A run that fetches 10,000 pages and extracts 3,000 valid records is partially failed, and your status model should have a state for that. Our article on developer checks that catch silent failures goes deeper on the individual checks.

Test before release and rehearse the incident

Treat the scraper like any production service. Before a release, run record-level checks (types, identifiers, ranges), dataset-level checks (duplicates, volume, freshness) and a source sample, where a few records are compared by hand against the live page. When something breaks, follow a fixed order: detect, contain, diagnose, repair, backfill, revalidate, deliver and communicate, then write down what you learned. The backfill step matters: if you stored raw documents, it is a re-parse, not a re-crawl.

Run the same pipeline in CI with a small canary job so proxy credentials, secrets and connectivity are verified before the nightly run, not during it. We cover that in scraping proxies in CI.

Where the proxy layer fits in uptime design

Everything above assumes the fetch layer returns real content. For many targets, that is where uptime is won or lost. Datacenter address ranges are widely recognized by sites, so requests from them are the first to be throttled or challenged. Real mobile carrier IPs look like ordinary phone traffic.

That changes the design in three concrete ways:

  • Fewer blocks to absorb. Our real carrier IPs are built so that requests look authentic and are less likely to be blocked or throttled. That reduces load on your circuit breakers, dead-letter queue and re-queue logic.
  • Session type per target. Rotating IPs suit broad discovery crawls. Sticky sessions suit multi-step flows such as logins, carts or paginated results, where changing IP mid-sequence breaks the session. We let you choose either per workload.
  • Location as a variable. For price comparison or ad verification, a result from the wrong city is a data-quality failure that no HTTP code will reveal. With city-level targeting across 46 US cities, you can pin the test to the market you are measuring.

On our side, we report roughly 99.9% uptime and a success rate above 99%. Your own SLO should still be measured at your boundary, with the four dimensions above, but a fetch layer with those characteristics gives the rest of the pipeline room to hit its target.

Our view: design uptime around the identity your requests carry

We run mobile proxies, and the pattern we see in how teams think about scraper reliability is that they over-invest in the code around the request and under-invest in the request itself. Queues, backoff and alerting are all necessary. But if every fifth request is challenged because of the address it came from, you are building an elaborate system to absorb a problem you could remove.

Our approach is to start from real US carrier IPs, so requests look like the traffic sites already expect. From there, pick sticky or rotating sessions to match the flow, target the city your data is about, and meter by the byte so the cost of a retry is visible in your usage dashboard. Teams manage credentials themselves, with no sales call or long-term commitment in the way of getting a test running.

Reliability then becomes what it should be: a question of your pipeline's design, your SLOs and your monitoring, not of whether the target let you in.

Jon

Plan your capacity and cost

Uptime and cost pull against each other, so make the trade explicit. Retries burn bandwidth, and bandwidth is what metered proxy plans charge for. Track cost per good record, not cost per request. A pipeline with a 5% block rate and aggressive retries can cost noticeably more per usable row than one with a 0.5% block rate.

Some practical levers:

  • Shard the frontier by domain so pacing is enforced locally, and expect throughput to stop scaling linearly once per-domain limits are the ceiling.
  • Widen refetch intervals when a page's content hash stops changing, and tighten them when it churns, so you spend bytes where data moves.
  • Cap retries at the item level, not just the request level.
  • Review volume monthly and move to a plan size that matches it.

If you are scoping a team workflow, our guide for engineering managers on five ops rules for scaling scraping covers credential ownership and process. Legal review belongs in the plan too; see US, EU and UK scraping rules.

Try it on your own workload

Our plans are tiered by monthly data pool: Starter is $30.00 per month, Basic $100.00, Advanced $500.00 and Scale $1,000.00, with prepaid data add-ons billed per GB and a free trial with limited data. Every plan includes HTTP, HTTPS and SOCKS5 support, API access, rotating and sticky sessions, and team credential management, so you can wire the fetch layer into Python, Node.js, Java, C#, Rust or browser automation the way your pipeline already works.

Masklabs

See the plans on our pricing page, or read about the real carrier IP features first.

FAQ

What is a good uptime target for a web scraper?

It depends on how fresh the data must be. Many teams set run availability around 99.5% to 99.9% and pair it with a freshness target of the agreed cadence plus a margin. On 1,000 monthly checks, 99.5% tolerates five failures. Set the target on delivered data, not on process uptime.

Why does my scraper show 100% success but the data is wrong?

HTTP success only proves a response came back. A block page can return 200, and a template change can leave fields empty. Track yield, row-count deviation against the source's own history, and null rates on key fields to catch it.

Which errors should a scraper retry?

Retry transient ones: timeouts, connection resets, 429, 502, 503 and 504, using capped exponential backoff with jitter and honoring Retry-After. Record 404 and 410 as final. Treat 403 and CAPTCHA pages as a signal to change session or IP, not to repeat the request.

Should I use sticky or rotating sessions?

Use rotating IPs for wide discovery crawls where each request is independent. Use sticky sessions when a sequence of requests must look like one visitor, such as logins, carts or paginated flows.

Sources

Recommended