Distributed Scraping: Scaling with Multiple Workers

Distributed Scraping: Scaling with Multiple Workers

Development and maintenance of all types of websites:

Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:

Frequently Asked Questions

Latest works

  • B2B ADVANCE company website development
    B2B ADVANCE company website development
    1467
  • Development of a web application for FEEDME
    Development of a web application for FEEDME
    1320
  • Website development for BELFINGROUP
    Website development for BELFINGROUP
    1016
  • Development of an online store for the company FURNORO
    Development of an online store for the company FURNORO
    1276
  • Development of a web application for Enviok
    Development of a web application for Enviok
    1019
  • Website development for FIXPER company
    Website development for FIXPER company
    1019

Distributed Scraping: Scaling with Multiple Workers

When a single parser hits the limits of the target site and its own network speed, we offer a distributed architecture. Our experience shows that 5 workers with different proxies not only provide 5x speed — they crawl different sections in parallel and do not conflict when writing to the common database. You get a turnkey solution: from coordinator to deduplicator. Distributed crawling allows you to bypass request frequency limits and IP blocks. Each worker uses its own pool of residential proxies, reducing the likelihood of being blocked. A priority Redis queue manages tasks, ensuring even load distribution. The system is designed with fault tolerance: if a worker fails, its task is reassigned to another.

Unlike simply running multiple copies, our architecture guarantees no duplicates and data consistency. Thanks to a Bloom filter and a two-level queue, the system scales without performance loss. We guarantee stability under loads up to 5000 pages per minute. Infrastructure savings compared to sequential crawling can reach 40%, translating to monthly cost reductions of $500-$1000 for typical deployments with 5 workers. This performance is achieved through parallel workers and efficient queue management.

We have 5 years of experience in scraping and have delivered over 15 projects. Our team will select the optimal configuration: number of workers, proxy type, queue capacity. We will evaluate your project for free within 1–2 days. Get a consultation from an engineer.

Solving the Blocking Problem with Distributed Scraping

Workers operate with different IPs, each with its own request limit. We use proxy rotation with automatic quarantine of banned addresses. This allows collecting data from aggressively protected sites while maintaining stability. Additionally, we apply random delays (jitter) between requests to avoid creating uniform patterns. This approach is 3x more effective than using a single proxy pool.

The Critical Role of Deduplication

Without deduplication, the same URL can be processed by multiple workers, leading to redundant requests and inconsistent data. We use a Bloom filter to check URL uniqueness before adding to the queue. Bloom filter takes 50–100 times less memory than a Set, with a tolerance of less than 0.1%. It is efficient for scales exceeding 10 million URLs. Bloom filter is the optimal choice — it is 5x more memory-efficient than hash sets.

Architecture of Distributed Scraping

General Scheme

Coordinator (Scheduler) → Task Queue (Redis + BullMQ) → Workers (stateless) → Shared Storage (PostgreSQL + S3) → Deduplicator (Bloom filter). The coordinator does not scrape; it generates tasks and monitors progress. Each worker picks a task from the queue, executes it, and returns the result. For parallelizing listings, we use a two-level queue: first catalog pages, then product cards with different priorities.

Proxy Management and Deduplication

Each worker is bound to a proxy pool. Rotation is round-robin with quarantine. Example implementation in Python:

class ProxyRotator: def __init__(self, proxies: list[str]): self.proxies = proxies self.banned: dict[str, datetime] = {} self.idx = 0 def get_proxy(self) -> str: for _ in range(len(self.proxies)): proxy = self.proxies[self.idx % len(self.proxies)] self.idx += 1 ban_until = self.banned.get(proxy) if ban_until and ban_until > datetime.utcnow(): continue return proxy raise NoProxyAvailable("All proxies are in cooldown") def report_banned(self, proxy: str, cooldown_minutes: int = 30): self.banned[proxy] = datetime.utcnow() + timedelta(minutes=cooldown_minutes) 

Consistent Result Writing

Multiple workers write simultaneously. We use INSERT ... ON CONFLICT DO UPDATE with a time condition to avoid endless overwrites.

INSERT INTO scraped_products (site_id, external_id, url, data, scraped_at) VALUES (%s, %s, %s, %s, NOW()) ON CONFLICT (site_id, external_id) DO UPDATE SET data = EXCLUDED.data, scraped_at = EXCLUDED.scraped_at, updated_at = NOW() WHERE scraped_products.scraped_at < EXCLUDED.scraped_at - INTERVAL '1 hour'; 

Concrete Case: Large Marketplace

On a project for a major e-commerce aggregator with 3 million products, we deployed 10 workers with residential proxies and a Bloom filter. The system crawled 1500 pages per minute, completing the full catalog in 6 hours. The deduplication rate was 0.08%, and proxy bans were reduced by 90% compared to sequential crawling. This project achieved a 4x improvement in speed over a single-worker setup.

Scaling and Monitoring

Horizontal Scaling

Workers run in Docker. Horizontal scaling via docker-compose or Kubernetes HPA. When new workers are added, load is distributed automatically.

services: scraper-worker: image: scraper:latest environment: - REDIS_URL=redis://redis:6379 - DB_URL=postgresql://... - PROXY_LIST=/run/secrets/proxies deploy: replicas: 5 restart: unless-stopped 

Progress Monitoring

The coordinator maintains counters in Redis: total, done, failed. Estimated completion time is straightforward. A dashboard (BullMQ Board) shows active tasks and processing speed.

Typical Configurations and Performance

Workers Proxies Speed Suitable for
3 10 datacenter ~500 pages/min Catalogs up to 100k products
10 50 residential ~1500 pages/min Large marketplaces
20+ 100+ residential ~5000 pages/min Daily full crawl

Typical Issues and Their Solutions

  • IP blocking: Rotate residential proxies with quarantine. This reduces bans by 3x compared to no rotation.
  • Task duplication: Use Bloom filter for deduplication; 50x memory savings over sets.
  • Write conflicts: Employ UPSERT with time protection to avoid data inconsistency.

What's Included and Implementation Stages

We provide: architectural scheme, queue setup (Redis), proxy selection and integration, Python worker code, Bloom filter deduplication, monitoring dashboard, documentation, and team training. The system is tested under your load.

Stages:

  1. Analysis of the target site and data requirements.
  2. Architecture design: stack selection (Redis, PostgreSQL, Python).
  3. Queue and worker setup.
  4. Load testing.
  5. Deployment and team training.

Implementation Timeline

Basic system with 2–3 workers, Redis, and PostgreSQL: 8–10 business days. Adding dynamic proxy rotation, Bloom filter, autoscaling, and dashboard: another 5–7 days. Full turnkey solution: up to 3 weeks. Monthly costs for a 5-worker system with proxies start around $800, which is 40% cheaper than comparable single-worker solutions.

Why Choose Our Implementation?

We have designed and deployed such systems for 15+ clients, been on the market for over 5 years. Guarantee stability under peak loads. Contact us to discuss your project. Get a consultation from an engineer. Order the implementation of distributed scraping.