How Puppeteer Clusters Cut a 6-Hour Daily Workflow to 20 Minutes

How Puppeteer Clusters Cut a 6-Hour Daily Workflow to 20 Minutes

Running 100+ isolated browser sessions in parallel with GoLogin profiles, proxy sync and a Node.js job queue, and what broke along the way.

On the PMS Automation project, a team was spending around six hours every day clicking through carrier portals by hand. The goal was simple to state and hard to build: let a system do it in the background, reliably, every day. The final workflow runs in about twenty minutes.

Why a single headless browser was not enough

The first prototype used one Puppeteer instance and processed accounts one by one. It worked, but it was slow and fragile: one stuck page blocked everything behind it, and every account shared the same fingerprint, which carrier sites quickly flagged.

Puppeteer clusters for parallel work

puppeteer-cluster lets you run a pool of browsers or contexts and push tasks into a queue. Each worker takes a job, runs it in its own context and returns the result. Concurrency becomes a number you tune, not a rewrite.

const cluster = await Cluster.launch({
  concurrency: Cluster.CONCURRENCY_CONTEXT,
  maxConcurrency: 12,
  timeout: 120_000,
  retryLimit: 2,
});

await cluster.task(async ({ page, data }) => {
  await runCarrierFlow(page, data.account);
});

for (const account of accounts) cluster.queue({ account });
await cluster.idle();
await cluster.close();

Isolated profiles and proxies

Each account needed its own browser profile, cookies and proxy, so sessions never leaked into each other. Integrating the GoLogin profile API meant every job launched with a dedicated, persistent profile, which removed most of the anti-bot friction.

What broke, and how I fixed it

  • Memory creep: long-lived browsers leaked memory. Recycling workers after a fixed number of jobs kept the box stable.
  • Flaky selectors: portals changed markup without notice. I moved to text and role based selectors with explicit waits.
  • Silent failures: every job now writes a status, a screenshot on error and a timing record to MongoDB Atlas.

Results

The system runs 100+ isolated sessions concurrently and reduced manual processing time by about 75%. More importantly, the team stopped babysitting browsers and started reviewing exceptions only.

Automation is not about speed first. It is about making the boring path reliable, then making it fast.

/ Muhammad Jawwad Raza

More on this topic

Photography
3D Models
Development
Illustrations
Fashion
Digital Art
Packaging
Motion
Illustrations
Video Production
Photography
3D Models
Development
Illustrations
Fashion