SK5 data
Back

How to Improve Data Collection Stability (Layer by Layer)

How to Improve Data Collection Stability (Layer by Layer)
sk5data

Open the failure log of a long-running collection job. Hundreds of thousands of error lines look nearly identical — timeout, 403, 429, empty fields. They are four different problems: the connection never came up, the identity was flagged, the target is rate-limiting you, or the page structure changed. Four problems, four fixes — and most teams apply exactly one of them: swap in a fresh batch of IPs.

That is why data collection stability is hard to fix. The reflex is too convenient. Failure gets treated as a single condition, so the answer always stops at "try another batch." It behaves more like a leak: plug one hole and the water comes out somewhere else. The rest of this article takes the problem apart into layers you can locate and measure.

1. Start with the conclusion: success rate is a product, not an average

Think of a single request as sending a parcel. The van has to be roadworthy (network path), the sender's identity has to survive inspection (IP and browser fingerprint), and the recipient's gatekeeper has to let you in (the target's request-rate and anti-automation policy). If any one link fails, the parcel never arrives — but in your dashboard they all show up as the same word: failure.

So end-to-end success is multiplicative, not additive:

0.98 (network) × 0.86 (identity) × 0.97 (parsing) ≈ 0.82

This also explains a familiar puzzle: the vendor console reports 99.9% availability while your job succeeds 70% of the time. Availability describes the network layer only. The losses in the identity and parsing layers are nobody's declared metric.

Attributing failures by layer is the first real step toward data collection stability. Before you move budget, find the break:

LayerTypical symptomCommon misdiagnosisDo this first
NetworkConnect timeouts, TLS handshake failures, sudden P95 latency spikesSwitch vendors immediatelyCheck whether failures cluster by country or by hour
IdentityBursts of 403/429, more captchas, empty shells returnedIncrease retry countMeasure per-IP requests per minute and session duration
ParsingHTTP 200 but missing fields, blank prices, mismatched structureBlame the proxyAdd field-level validation and snapshot retention

Do not reverse the order. Locate the layer first, then choose the fix. Read the logs before you change the contract.

2. The IP layer sets the ceiling; quantity does not

The meaningful difference between proxy IPs is not how many there are, but what identity the IP represents and how long that identity can be maintained. Three common forms map to completely different business constraints:

DimensionDynamic residentialLong-acting static ISPUnlimited residential
IdentityReal household egress, rotating per request or per sessionFixed residential-class IP allocated by a carrierResidential pool, no traffic metering
Identity consistencyConsistent within a session, changes across sessionsUnchanged over the long termConfigurable by policy
Reuse riskLarge pool, low per-IP densitySame IP for long periods, so control rate activelyDepends on partition scheduling under high concurrency
Best forMulti-region list scraping, price and sentiment monitoring, ad and localization verificationLong-running jobs that need login state or a fixed environmentHigh-volume, long-duration batch jobs
Billing unitTrafficPer IP or per periodPer period

A practical decision order: ask whether the task must remain "the same person" for 30 minutes. If yes, choose static ISP. If not, ask whether the volume is large or the footprint is wide — wide footprint points to dynamic residential, sustained volume points to unlimited residential.

Resource scale is necessary but not decisive. A provider like sk5data offers a pool of 90M+ real residential IPs across 195+ countries and regions, with country, city, and carrier-level targeting and 99.9% service availability — full specs are on the dynamic residential proxies page. Those numbers answer "is it enough." Whether it stays stable depends on the scheduling design in the next section.

One selection criterion gets overlooked: whether the billing model matches the task shape. Traffic billing is economical for verification work, but if your job runs detail pages continuously with heavy per-page resources, per-period or per-IP billing is more controllable — the budget becomes predictable, and the team stops cutting jobs short when the balance runs low. Interruption itself is the enemy of stability.

3. The scheduling layer: rotation cadence and concurrency ratio matter more than pool size

This is where data collection stability is usually lost, and it is lost in code, not on the purchase order.

Match rotation cadence to page depth. List pages can rotate per request because each request stands alone. Detail pages with pagination and session state must rotate per session. Tasks that require login, verification, or multi-step navigation need a session that survives the whole flow — swapping identity mid-way means starting over from step one. Sessions that are too short get bounced at step three.

Concurrency is a ratio problem, not a size problem. One calculation you can do directly:

requests per IP per minute = concurrency ÷ active IP count

Assume a target tolerates roughly 10 requests per minute per IP. Run 200 concurrent requests with only 10 IPs active, and the real density is 20 per IP per minute — you generated the rate limiting yourself, and it had nothing to do with the provider. With the same 200 concurrency across 60 active IPs, density drops to 3.3 and success rate changes immediately.

Session strategy also has to fit the task. When a script must hold the same network identity over time — a localized page that carries user preference settings, or a market whose results page degrades for unfamiliar identities — static ISP proxies are simpler than a rotating pool: the identity stays fixed, the diff carries one less confound, and movement is easier to attribute to the content itself.

Isolate queues by value. Put high-value, low-tolerance tasks (price ingestion, stock determination) in different pools and different concurrency queues from low-value, high-tolerance tasks (list completion, historical backfill). Run them together and a single backfill batch will drag your core job's IP reputation down with it.

Use exponential backoff with jitter, never a fixed sleep. A fixed interval makes a large batch of requests retry in the same second, creating a new pulse — from the target's side it looks like coordinated traffic. Exponential backoff plus random jitter spreads retries across the timeline.

4. The code layer: four moves separate 70% from 90%

Four changes in the client decide where data collection stability actually lands — and none of them costs anything.

Move one: handle status codes separately. Do not wrap everything in one try/except.
import random, time
from requests.exceptions import ConnectTimeout, ReadTimeout

RETRYABLE = (ConnectTimeout, ReadTimeout)

def fetch(session, url, max_retry=3):
    for attempt in range(max_retry):
        try:
            r = session.get(url, timeout=(5, 20))
            if r.status_code == 200:
                return r
            if r.status_code == 429:                      # throttled: slow down, back off
                time.sleep(min(2 ** attempt, 30) * (1 + random.random()))
                continue
            if r.status_code == 403:                      # refused: change identity, do not retry in place
                session.rotate_identity()
                continue
            if r.status_code == 404:                      # does not exist: retrying is pointless
                return r
        except RETRYABLE:
            time.sleep(2 ** attempt * (1 + random.random()))
    return None

The distinction matters: 429 means "slow down," 403 means "be someone else," 404 means "this path was never there." Sharing one retry branch across all three turns rate limiting into a ban.

Move two: shard the job and persist a cursor so interruption is recoverable. A 280,000-item job that dies at 190,000 restarts from zero without a cursor; with one, it resumes and fetches the remaining 90,000. Cursor resume does not raise per-request success, but it decides the effective yield of long-running jobs.

Move three: validate fields, so a 200 cannot fool you. A successful request is not collected data. Empty shells, challenge pages, and geo-redirect pages all return 200. Add non-empty and format validation on key fields, retain snapshots of anomalous samples, and parsing-layer loss becomes visible.

Move four: watch at least four metrics. Request success rate, P95 latency, per-IP requests per minute, and the separate shares of 403 and 429. Add field completeness as a fifth. Run this for a week and you have a baseline — and only with a baseline does "improving stability" mean anything, because otherwise every change is judged by feel.

5. Five recurring mistakes

  1. Watching request success but not data completeness. 95% success with 60% completeness means half your warehouse is nulls, and every downstream model and report inherits the damage.
  2. Retries without a ceiling. One bad URL can occupy the entire retry queue and stall a batch for hours.
  3. One shared proxy pool for everything. Without per-task isolation, one misbehaving job floods every business line.
  4. Rotating the IP but not the fingerprint. Egress changes while User-Agent, timezone, language, and TLS fingerprint stay stale — from the risk engine's view it is the same person in different coats.
  5. No geographic dimension. Passing a small local test and shipping means discovering later that success collapses in a few countries. Build baselines per target country and city for multi-region jobs.

Everything above is engineering. One thing sits outside engineering and decides whether the system can run for years: collection behaviour has to stay within bounds — respect the target site's robots.txt and terms of use, keep request rates from burdening the target, process public data only, and stay away from personal information and restricted content. Stability only means something when the collection itself is compliant; data obtained by hammering a site is not sustainable data by definition.

Geography also deserves attention for cross-border and multi-region price monitoring, since many "failures" are really requests landing on the wrong country version of a page. The AI data collection solution covers these scenarios in more detail. Teams that need to verify search and ad display by region can also follow the approach in the SEO monitoring solution, which bakes region, frequency, and session into the scheduling configuration.

6. FAQ

Q1: The vendor says 99.9% availability. Why is my success rate only 70%?

Because they measure different things. Availability usually means the proxy node accepts a connection — network layer. Your success rate also includes the identity layer (whether you get flagged or throttled) and the parsing layer (whether the page still has the structure you expect). Split your failure samples into 403, 429, timeouts, and empty fields, and you can usually find the dominant loss inside half an hour.

Q2: Dynamic residential or long-acting static ISP for a long-running job?

Look at how much identity consistency the task needs. If the same network identity has to persist across requests — login state, cart, continuous pagination, account verification — choose static ISP. If you only need multi-region coverage and each request stands alone, a dynamic residential pool is larger and has lower per-IP density, which is more stable. They also combine well: core paths on static ISP, peripheral scraping on dynamic residential.

Q3: When throttled with a 429, should I reduce concurrency or rotate the IP?

Slow down first, rotate later. A 429 says the frequency is too high; rotating just hands the problem to the next identity, and the pool will be exhausted all the same. The correct order is: back off, then reduce concurrency for that target, and only then — if per-IP density is already low and 429s persist — treat it as a subnet-level reputation issue and change pools.

Q4: Do I have to switch providers to improve data collection stability?

Not necessarily. Attribute first. If failures cluster in network-layer timeouts and handshake failures within specific regions, switching helps. If they are mostly 403 and 429, or a large share of 200-but-empty pages, the problem is in your rotation strategy, concurrency ratio, and parsing validation — and the metrics will not move after a switch. Fixing the code is usually cheaper than renegotiating the contract.

Q5: How do I know whether my collection frequency is appropriate?

The standard is that it should not burden the target site. In practice, set a per-domain QPS ceiling for yourself and enforce it in the scheduling layer rather than trusting each developer's judgement. Keep a review step for robots.txt and target terms of use, and move the compliance check into task configuration instead of handling it after the fact.

Before you start, do one small thing

You do not need to rebuild the system to improve data collection stability. Take one core job that is currently running, export last week's failure samples, and count them by 403, 429, timeout, and empty field. Ten minutes usually shows where the dominant loss sits — and therefore whether to fix scheduling, selection, or parsing.

The cheapest way to test whether the proxy layer is the bottleneck is to run a real job through it. sk5data offers a 500MB free trial covering dynamic residential, long-acting static ISP, and unlimited residential lines — enough to run the same job twice and compare.

Three things we are reasonably confident about:

  • Scale that holds up: 90M+ real residential IPs across 195+ countries and regions, with country, city, and carrier-level targeting, so multi-region jobs do not need several vendors stitched together.
  • Billing that matches the task: traffic-based, period-based, and per-IP options, so budgets stay predictable and long jobs do not pause because someone was watching a balance.
  • Low integration cost: one console for plans, usage, authentication, and proxy configuration, with HTTP/SOCKS5 support, so existing scripts and scraping frameworks need almost no rework. Specs and billing for all three proxy types are on the proxy plans page.