Skip to content

Commit 86f5aab

Browse files
committed
Style bPools guidance
1 parent 438cb8b commit 86f5aab

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

browsers/pools/overview.mdx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,27 @@ Browser pools are a way to pre-configure a fixed set of browsers without being c
1111

1212
<Steps>
1313
<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.
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.
15+
16+
<Info>
17+
Pool declarations should be decoupled from browser runtime logic for the best performance.
18+
</Info>
1519
</Step>
1620
<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).
21+
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.
1822

19-
The total number of usable browsers is fixed to the `size` specified upon browser pool creation.
23+
The total number of browsers is fixed to the `size` specified upon browser pool creation. 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.
2024

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).
25+
<Info>
26+
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).
27+
</Info>
2228
</Step>
2329
<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.
30+
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.
31+
32+
<Info>
33+
Failing to release browsers may result in unexpected latency when acquiring future browsers.
34+
</Info>
2535
</Step>
2636
</Steps>
2737

0 commit comments

Comments
 (0)