How Can I Configure a Puppeteer Grid Comparable to Selenium Grid?

Seeking guidance to set up a multi-node Puppeteer grid similar to Selenium Grid. How can I configure parallel testing nodes? Example:

const instance = await puppeteer.attach({ serverEndpoint: 'ws://localhost:3000' });
// additional setup code

i would try using node clustering to spawn multiple puppeteer instances and link them to a central controller. not totally sure but a remote control based approach might work for parallel tests, kinda similar to how selenium’s grid works.

In my experiments I found a viable approach by decoupling the test orchestration from the Puppeteer instances themselves. Rather than depending solely on clustering, I built a lightweight queue system where each worker subscribes to test cases submitted by a central scheduler. This design allowed me to scale the system by adding more containers running headless Chrome, and I could handle failure scenarios more gracefully. Integrating a monitoring layer helped manage the node-to-node communication and ensured robustness during parallel test execution.

In my experience setting up a grid-like infrastructure for Puppeteer, I found that separating the orchestration logic from the actual browser instances made a significant difference in manageability and scalability. I ended up deploying each Puppeteer instance inside its own container to avoid any interference, and then used a centralized task queue that workers pulled from. The communication between the central controller and the containerized instances was managed via a reliable message broker, which helped address latency and communication errors that could otherwise cause delays in parallel test executions.