Browserless 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 an instance of the Browserless container, running on a virtual-machine. The size of the worker will dictate what types of sites and interactions you can do. For Browserless Enterprise customers, we go through an onboarding process where we help pick the right size and class of machine in order to properly support your workloads.
Session
A session is anytime Chrome is actively running and connected to. Browserless, however, automatically queues up to 2X this amount without any changes in your app's code for Enterprise plans only. Our cloud-unit fleet is provisioned such that you shouldn't ever encounter a sluggish connection. This allows you to set a baseline of traffic throughput, but allows for "bursts" of traffic without having to adjust any of your code (just keep using puppeteer.connect
).
If more sessions are needed, please reach out to us.
Pressure
The Pressure API is only available for Enterprise plans that run on a dedicated fleet of machines.
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 account 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
}
}
}
More Coming
Did we miss something? Send us an email and let us know!