Skip to content

Commit

Permalink
Improve prune docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
dfish3r committed Dec 2, 2024
1 parent 7b58086 commit 4e3a831
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/guide/connections/pooling.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ idleTime | PT10M | time at which a connection should be considered idle and beco
ageTime | PT0 | time at which a connection has aged out and should be removed from the pool. Zero means no age is enforced.
prunePriority | -1 | for prioritized connections, these should be pruned using the age time. -1 means no prune priority is enforced.

Only available connections can be pruned from a pool, if a pool is under heavy load the prune strategy will not attempt to alter the pool size. Idle connections will be removed until the minimum pool size is reached. This may produce undesirable results if you're using a connection strategy that will connect to standby servers and you want to reduce the time that those specific connections stay in the pool. If you are using an `ActivePassiveConnectionStrategy` or a `DnsResolverConnectionStrategy` the prunePriority can be used to prioritize the removal of less desirable connections. For instance, by setting prunePriority=1 and ageTime=PT30M with an `ActivePassiveConnectionStrategy`, you can guarantee that connections with a priority >= 1 are removed from the pool after 30 minutes (if load allows). Setting an ageTime may prune the pool below its minimum size, but it will attempt to grow back to its minimum at the end of the prune process.
Only available connections can be pruned from a pool, if a pool is under heavy load the prune strategy will not attempt to alter the pool size. Idle connections will be removed until the minimum pool size is reached. This may produce undesirable results if you're using a connection strategy that will connect to standby servers and you want to reduce the time that those specific connections stay in the pool. If you are using an `ActivePassiveConnectionStrategy` or a `DnsSrvConnectionStrategy` the prunePriority can be used to prioritize the removal of less desirable connections. For instance, by setting prunePriority=1 and ageTime=PT30M with an `ActivePassiveConnectionStrategy`, you can guarantee that connections with a priority >= 1 are removed from the pool after 30 minutes (if load allows). Priority is zero based, so the first connection created by the strategy will have a priority of zero. Setting an ageTime may prune the pool below its minimum size, but it will attempt to grow back to its minimum at the end of the prune process.

A custom idle prune strategy can be configured by setting the prune strategy on the connection pool.

Expand Down

0 comments on commit 4e3a831

Please sign in to comment.