--browser-pool-max
- CLI
- --browser-pool-max
- REST
- CLI only
Caps the number of browser processes that --cdp, --server, and --mcp-local-server spawn to distribute concurrent load.
| Behavior | Rule |
|---|---|
| Scale-out threshold | 8 concurrent --cdp clients or renders per process |
| At capacity | New clients and renders route to the least-loaded process |
Each process runs its own main and compositor threads, keeping latency steady under high concurrency while sharing a single license activation. Processes start on demand; if a process exits or stops responding, its active work fails and ZShot spawns a replacement on the next request.
Under --cdp, each client stays pinned to one process for the life of its connection and sees only its own pages.
In server mode, pooling activates when --server-max-concurrency exceeds 8. Concurrency limits, queueing, /status, /metrics, and --server-unhealthy-at apply across the entire pool. On /metrics, zshot_browser_pool_members reports the active process count, and child processes label their series with member.
Example
Cap a Playwright test run to two browser processes:
zshot --cdp --browser-pool-max 2 -- npx playwright testServe 32 concurrent renders across up to four browser processes:
zshot --server --server-max-concurrency 32 --browser-pool-max 4Disable pooling and run all clients on a single browser process:
zshot --cdp --browser-pool-max 1 -- npx playwright test