How It Works
Instead of launching a new browser for each request, Reader maintains a pool of browser instances that are reused across requests. This provides:- Faster responses - No browser startup overhead
- Memory efficiency - Controlled resource usage
- Reliability - Automatic health checks and recycling
Default Behavior
When usingReaderClient, a browser pool is automatically created and managed:
Configuration
Configure the browser pool when creatingReaderClient:
Pool Options
| Option | Default | Description |
|---|---|---|
size | 2 | Number of browser instances in pool |
retireAfterPages | 100 | Recycle browser after N page loads |
retireAfterMinutes | 30 | Recycle browser after N minutes |
maxQueueSize | 100 | Maximum pending requests in queue |
How Recycling Works
Browsers are automatically retired and replaced when they reach limits:- Page limit - After loading N pages, browser is recycled
- Age limit - After N minutes, browser is recycled
- Health check failure - If browser becomes unresponsive
Queue Management
When all browsers are busy, requests are queued:maxQueueSize, new requests will fail with an error.

