Puppeteer Cluster is a library that manages a pool of Puppeteer workers to run Chromium instances in parallel.
The tool solves the problem of efficiently crawling multiple pages or running browser-based tests concurrently. It spawns a pool of Chromium instances and handles job queuing, error recovery, and browser lifecycle management. When a browser crashes, the tool automatically restarts it. Jobs can be configured to retry automatically on failure. The library offers three built-in concurrency models that control isolation between jobs: page-level concurrency shares cookies and localStorage across jobs, context-level concurrency uses incognito pages to isolate data, and browser-level concurrency runs each job in a separate browser instance to prevent crashes from affecting other jobs.
Developers should choose this tool when they need to parallelize browser automation tasks at scale, such as crawling large numbers of pages or running many browser tests. It suits projects that require reliable error handling and automatic recovery without manual intervention. The library provides progress monitoring and statistics to track cluster activity. TypeScript support via generics allows type-safe definitions of input and output data for tasks.
The project maintains active engagement with pull requests and issues, showing responsiveness to community contributions and bug reports. Development includes regular updates to keep pace with Puppeteer API changes and Node.js ecosystem evolution. The codebase demonstrates attention to code quality through TypeScript adoption and comprehensive examples covering common use cases from simple screenshots to large-scale crawling scenarios.