Skip to content
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

Redis: add minimal connection pooling documentation #37267

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions docs/src/main/asciidoc/redis-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,24 @@

The associated environment variable is `QUARKUS_REDIS_PASSWORD`, or `QUARKUS_REDIS_<NAME>_PASSWORD` for named clients.

=== Connection pooling

Connections to Redis are always pooled.
By default, maximum number of connections in the pool is 6.
This can be configured using `quarkus.redis.max-pool-size`.

When the connection pool is depleted, attempts to obtain a connection are put into a queue.
By default, maximum number of attempts waiting in the queue to obtain a Redis connection is 24.
This can be configured using `quarkus.redis.max-pool-waiting`.

Executing certain commands modifies the server-side state and the behavior of the connection.
Such connections cannot be reused and when closed, they are not put back into the pool; instead, they are truly closed.
The commands that cause this behavior are:

* subscription commands (`SUBSCRIBE`, `UNSUBSCRIBE` etc.)

Check warning on line 238 in docs/src/main/asciidoc/redis-reference.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsWarnings] Consider using 'and so on' rather than 'etc' unless updating existing content that uses the term. Raw Output: {"message": "[Quarkus.TermsWarnings] Consider using 'and so on' rather than 'etc' unless updating existing content that uses the term.", "location": {"path": "docs/src/main/asciidoc/redis-reference.adoc", "range": {"start": {"line": 238, "column": 42}}}, "severity": "WARNING"}
* `SELECT`
* `AUTH`

== Use Redis data sources

Quarkus exposes a high-level API on top of Redis.
Expand Down