Skip to content

Commit 2446bb7

Browse files
committed
add guidance on bpools
1 parent 2e4debe commit 2446bb7

4 files changed

Lines changed: 23 additions & 2 deletions

File tree

browsers/pools/overview.mdx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,27 @@ description: "Pre-configure pools of reserved browsers for immediate acquisition
55

66
Browser pools let you maintain a set of reserved, identical browsers ready for immediate use. Use them to set your preferred browser configuration in advance, allowing you to minimize browser start-up latency and scale your workloads in production.
77

8+
## How browser pools work
9+
10+
Browser pools are a way to pre-configure a fixed set of browsers without being charged for them until they are used (i.e. `acquired`). All browsers in the pool share the same settings upon instantiation.
11+
12+
<Steps>
13+
<Step title="Declare a pool">
14+
First, declare a pool of browsers with your specified configuration. The pool takes time to fill (see [fill rate per minute](https://www.kernel.sh/docs/api-reference/browser-pools/create-a-browser-pool#body-fill-rate-per-minute)), so declare your pool outside your browser automation / agent runtime logic. Pool declarations should be decoupled from browser use logic for the best performance.
15+
</Step>
16+
<Step title="Acquire a browser">
17+
You can acquire a browser as soon as you've created a pool. The request returns immediately if a browser is available, or waits until one becomes available. The `acquire_timeout_seconds` parameter controls how long to wait for a browser; it defaults to the calculated time it would take to fill the pool at the pool's configured [fill rate](https://www.kernel.sh/docs/api-reference/browser-pools/create-a-browser-pool#body-fill-rate-per-minute).
18+
19+
The total number of usable browsers is fixed to the `size` specified upon browser pool creation.
20+
21+
When you acquire a browser, the pool's available count is decremented by one. When you release a browser, the pool's available count is incremented by one. put differently, the pool does not top up when you acquire a browser: browsers are "borrowed" from the pool and must be returned when you're done with them, either by [releasing them](#release-a-browser) or allowing them to [timeout](#timeout-behavior).
22+
</Step>
23+
<Step title="Release a browser">
24+
When you're done with a browser, release it back to the pool. this step is important; otherwise, the browser will continue to be in an `acquired` state until it [times out](#timeout-behavior). Failing to release browsers may result in unexpected latency when acquiring future browsers if the pool is only refilling when browsers timeout.
25+
</Step>
26+
</Steps>
27+
28+
829
## Create a pool of reserved browsers
930

1031
Create a browser pool with a specified size and configuration. All browsers in the pool share the same settings.
File renamed without changes.

changelog.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ For API library updates, see the [Node SDK](https://github.com/onkernel/kernel-n
5656
## Documentation updates
5757

5858
- Documented MFA token auto-retry behavior for [managed auth](/auth/overview) sessions.
59-
- Added a new [Managing Browsers](/browsers/pools/managing-browsers) page to the Reserved Browsers documentation.
59+
- Added a new [policy.json](/browsers/pools/policy-json) page to the Reserved Browsers documentation.
6060
- Clarified that [profiles](/auth/profiles) can have multiple auth connections.
6161
- Added a Headful + GPU acceleration option to the [pricing calculator](/info/pricing#pricing-calculator).
6262
</Update>

docs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
"group": "Reserved Browsers",
141141
"pages": [
142142
"browsers/pools/overview",
143-
"browsers/pools/managing-browsers",
143+
"browsers/pools/policy-json",
144144
"browsers/pools/scaling",
145145
"browsers/pools/faq"
146146
]

0 commit comments

Comments
 (0)