Terminology
On the main browserless.io site, and inside this documentation site, you'll notice we use a few terms like "worker" or "session". Below is a list of commonly-used terms and what they mean.
Worker
A worker is a Browserless container instance running on a virtual machine. Cloud-Unit plans use a distributed fleet of workers to serve multiple users simultaneously, while Enterprise customers can work with us to provision appropriately sized workers and scale them to meet their specific traffic requirements.
Session
A session is anytime Chrome is actively running and connected to. Browserless automatically queues up to twice your concurrency limit, allowing traffic bursts without code changes—simply continue using puppeteer.connect() and requests will queue when capacity is reached.
To handle higher session volumes, you can scale up your worker size or deploy additional worker instances.
Concurrency
Concurrency refers to the maximum number of browser sessions that can run simultaneously on a browserless instance. This is a core limit that controls how many parallel browser automations your account can execute at once.
For self-hosted instances, concurrency can be configured via the CONCURRENT or MAX_CONCURRENT_SESSIONS environment variables, with a default of 10 concurrent sessions. For details of concurrency limits in different plans, see our pricing plans for concurrency limits.
There's also a queue system configured via QUEUED or QUEUE_LENGTH environment variables (default 10) that allows requests to wait when concurrency is at capacity.
You can check current concurrency usage via the /pressure API endpoint, which returns:
running: Current number of active sessionsqueued: Current number of queued sessionsmaxConcurrent: Maximum allowed concurrent sessionsmaxQueued: Maximum allowed queued sessions
Pressure
Pressure indicates how much traffic is going on in your workers at any given time. Using the GraphQL API, you can fetch important details like isAvailable to see if your workers can handle another connection. Doing so will ensure your accout doesn't get overloaded and become unresponsive.
# https://api.browserless.io/graphql
{
pressure(apiToken: "YOUR_API_KEY") {
running
recentlyRejected
queued
isAvailable
date
}
}
This request will return a JSON object with the following payload:
// JSON returned
{
"data": {
"pressure": {
"running": 0,
"recentlyRejected": 0,
"queued": 0,
"isAvailable": true,
"date": 1524762532204
}
}
}