Keycloak
21 строка · 1.1 Кб
1<#import "/templates/guide.adoc" as tmpl>
2<#import "/templates/links.adoc" as links>
3
4<@tmpl.guide
5title="Concepts for database connection pools"
6summary="Understand these concepts to avoid resource exhaustion and congestion"
7tileVisible="false" >
8
9This section is intended when you want to understand considerations and best practices on how to configure database connection pools for {project_name}.
10For a configuration where this is applied, visit <@links.ha id="deploy-keycloak-kubernetes" />.
11
12== Concepts
13
14Creating new database connections is expensive as it takes time.
15Creating them when a request arrives will delay the response, so it is good to have them created before the request arrives.
16It can also contribute to a https://en.wikipedia.org/wiki/Cache_stampede[stampede effect] where creating a lot of connections in a short time makes things worse as it slows down the system and blocks threads.
17Closing a connection also invalidates all server side statements caching for that connection.
18
19include::partials/database-connections/configure-db-connection-pool-best-practices.adoc[]
20
21</@tmpl.guide>
22