Thanks to visit codestin.com
Credit goes to github.com

Skip to content

META: External Connection Pooling and Custom Pool Integration #6286

@mercmobily

Description

@mercmobily

META: External Connection Pooling and Custom Pool Integration

There are several related issues about using external connection poolers (like PgBouncer, RDS Proxy, etc.) or custom connection pools instead of Knex's built-in tarn.js pooling. This META issue tracks all of them.

The Core Problems:

  1. No way to disable Knex's internal pooling - Users want to use external poolers like PgBouncer, AWS RDS Proxy, or cloud-managed connection pooling, but Knex always creates its own pool
  2. Cannot pass pre-existing pools - Users want to share connection pools between Knex and other libraries (like express-mysql-session) but have no way to pass an existing pool to Knex
  3. Cannot access Knex's pool - Users want to access the underlying pool instance for monitoring, sharing with other libraries, or custom management

Use Cases:

  • Cloud environments: Using managed connection poolers (AWS RDS Proxy, Azure Database connection pooling, Google Cloud SQL connection pooling)
  • PgBouncer: Transaction-mode pooling for better connection efficiency across multiple application instances
  • Multi-app coordination: Sharing a single connection pool between Knex and other libraries (session stores, job queues, etc.)
  • Stateless connections: AWS Data API and similar services where connections are handled externally
  • Pool observability: Monitoring pool metrics, implementing custom health checks, debugging connection issues

Related Open Issues:

Related Closed Issues (for context):

This meta issue tracks progress on supporting these external pooling scenarios.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions