BrowserThing

Use Playwright in your app. Run browsers elsewhere.

A self-hosted browser pool for Playwright applications. Reuse running browsers for short tasks, with session cleanup and configurable browser recycling.

BrowserThing was built for applications that run many short browser tasks. Starting a new browser each time adds time and CPU use. Keeping the same browser running indefinitely can let memory use grow or leave it in a bad state. BrowserThing reuses running browsers and replaces them after a configurable number of sessions.

Write normal Playwright code and connect through one WebSocket endpoint. BrowserThing selects an available worker and cleans up each session when its connection closes. Several applications can share the same internal service.

Run workers on separate machines to keep browser CPU and memory use off your application servers. Add workers when you need more browser capacity, independently of your application instances.

How it works

Your application's Playwright code connects to BrowserThing. The service selects an available browser worker and relays commands and results. Browsers stay running between tasks. This example saves a screenshot.

preview.mjs / your app
import { chromium } from 'playwright'; const browser = await chromium.connect(  'ws://localhost:8080');const page = await browser.newPage();await page.goto('https://example.com');await page.screenshot({ path: 'preview.png' });await browser.close();

You deploy and update the service for your own applications and trusted clients. Browser contexts separate cookies and storage, but sessions share a browser process on each worker. See the security boundary. Connect your application with the quick start.