Add a setting to limit number of sessions per application #89835
Labels
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Is your feature request related to a problem? Please describe.
Currently some customers are colocating multiple applications on the same cluster. While #76401 added support for client connections per node, this is not granular enough for some use cases.
Different applications may have different needs in terms of how many sessions they need to use. Uniformly applying a single cluster wide limit across all applications means some applications will be over provisioned and some will be starved out for sessions. Having a per application session limit would allow each application to have a set number of sessions.
Describe the solution you'd like
An off-by-default setting similar to server.max_connections_per_gateway but on a per application basis. We would need a way to specify the application name and its session limit. We also need to decide where this setting should live.
Describe alternatives you've considered
Long term, Unified Architecture (UA) which will allow multi tenant clusters could solve this problem where each cluster with its own max connection limit would map to a single application. But it is worth discussing adding a per application connection limit for the near term.
Alternatively, this could also be configured on a per SQL user basis.
Jira issue: CRDB-20460
The text was updated successfully, but these errors were encountered: