Skip to content

Add per-domain concurrency, retry backoff, internal stats, and stability improvements #557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

decompi
Copy link

@decompi decompi commented Mar 25, 2025

Overview

This PR improves puppeteer-cluster by adding:

  • βœ… Per-domain concurrency limits via sameDomainConcurrency option.
  • πŸ” Exponential backoff for retries based on retryDelay.
  • πŸ“Š A new getStats() method to expose internal cluster metrics.
  • πŸ”„ Graceful shutdown logic using idle() in close().
  • βœ… Improved TypeScript typings across internal modules.

Why?

These changes enhance stability and performance in production environments with many dynamic or domain-heavy scraping targets.

Test Plan

  • Manual testing with ~100 jobs across multiple domains
  • Verified retry logic & backoff behavior
  • Confirmed getStats() returns correct runtime metrics
  • Graceful shutdown confirmed after tasks complete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant