-
Notifications
You must be signed in to change notification settings - Fork 435
fix: high-perf pooling doc #2332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
12b8602
fix: high-perf pooling doc
vinckr 181f634
chore: apply suggestion from code review
vinckr e410fe3
chore: apply suggestion from code review
vinckr 9053bc9
chore: apply suggestions from code review
vinckr 3d78b13
chore: omit slop
vinckr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| --- | ||
| id: high-performance-pooling | ||
| title: High-performance database connection pooling | ||
| sidebar_label: High-performance pooling | ||
| --- | ||
|
|
||
| High-performance pooling is available for CockroachDB and PostgreSQL with an Ory Enterprise License (OEL). It provides additional | ||
| configuration options for managing database connections under variable load. | ||
|
|
||
| To activate high-performance pooling, you must set the `pool_min_conns` parameter, otherwise high-performance pooling will not be | ||
| enabled. | ||
|
|
||
| - `pool_min_conns` (number): The minimum number of total (in-use and idle) database connections to keep open at all times. After a | ||
| connection closes, the pool may dip below `pool_min_conns` momentarily. Defaults to 0. | ||
| - `pool_max_conns` (number): Sets the maximum number of open connections to the database. Overrides `max_conns`. | ||
| - `pool_max_conn_idle_time` (duration: for example "500ms", "5s", "30m", "1h"): Database connections will be closed after idling | ||
| for this duration. Overrides `max_conn_idle_time`. | ||
| - `pool_max_conn_lifetime` (duration: for example "500ms", "5s", "30m", "1h"): Sets the time after which a connection will be | ||
| closed, irrespective of how long it has been idle. Overrides `max_conn_lifetime`. | ||
| - `pool_max_conn_lifetime_jitter` (duration: for example "500ms", "5s", "30m", "1h"): Jitter to add to the | ||
| `pool_max_conn_lifetime` value. This is useful to avoid thundering herd problems when many connections are closed and re-opened | ||
| at the same time. | ||
| - `pool_health_check_period` (duration: for example "500ms", "5s", "30m", "1h"): Sets the period for health checks to potentially | ||
| kill stale connections. Defaults to "1m". | ||
|
|
||
| ## When to use high-performance pooling | ||
|
|
||
| Standard pooling opens connections on demand and closes them after idle timeout, which can cause connection storms during sudden | ||
| traffic spikes. High-performance pooling maintains `min_pool` persistent connections and includes refresh jitter to prevent | ||
| synchronized resets, without initialization overhead and reducing the risk of database overload during demand surges. | ||
|
|
||
| Consider high-performance pooling when your workload exhibits: | ||
|
|
||
| - Large, unpredictable traffic spikes | ||
| - Sudden transitions from low to high request volume | ||
| - Time-sensitive operations where connection initialization latency is problematic | ||
|
|
||
| For steady-state traffic or gradual load changes, standard pooling may be enough. | ||
|
|
||
| ## When not to use high-performance pooling | ||
|
|
||
| High-performance pooling does not reload TLS certificates while the process is running. If database TLS certificates change, you | ||
| must restart the Ory service to establish connections using the new certificates. Standard pooling supports hot reloading of TLS | ||
| certificates because connections close after idle timeout and reconnect with refreshed credentials. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.