Akshay Soner

Automation

Distributed Web Scraper

Multithreaded, fault-tolerant scraper with proxy rotation, resumable runs, and persistent storage for large-scale data collection.

01

Overview

Scraping at scale fails in predictable ways — blocked IPs, dropped connections, and processes that die halfway through a run. The scraper had to be built around those failure modes from the start, not patched afterward.

02

Challenge

Any long-running scrape will hit rate limits, blocks, and network failures. The system needed to keep working through individual failures, avoid losing progress on a crash, and not duplicate work already completed.

03

Architecture

A queue of target URLs is worked by multiple threads in parallel, each routed through a rotating proxy pool to distribute load and avoid blocks. Retry logic handles transient failures, run state is persisted so an interrupted run can resume rather than restart, and results are written to MySQL as JSON-structured records.

  1. URL Queue
  2. Worker Threads
  3. Proxy Pool
  4. Retry / Resume Logic
  5. MySQL Storage

04

Implementation

  • Multithreaded workers pull from a shared URL queue for parallel throughput.
  • Proxy rotation distributes requests across a proxy pool to reduce blocking.
  • Run state persisted so an interrupted process can resume from where it left off instead of restarting.
  • Retry logic around transient network failures, with results written to MySQL for durable, queryable storage.

05

Technologies

PythonMultithreadingMySQLJSONProxy Infrastructure

06

Engineering Decisions

Why persist run state for resumability?

Long-running scrapes will eventually hit a crash, block, or manual stop. Without resumability, any interruption means redoing completed work.

Why MySQL for storage over flat files?

Structured, queryable storage makes it possible to check progress, dedupe, and inspect results mid-run instead of parsing output files after the fact.

07

Reliability

  • Retry logic around transient failures instead of letting individual errors kill the run.
  • Resumable state means crashes or restarts don't lose completed work.
  • Proxy rotation reduces the chance of the entire run being blocked at the source.

08

Outcome

A distributed scraper capable of large-scale, long-running data collection that survives individual failures without losing progress.

More work