Skip to main content
Definition Website Computer and Technology

Connection Pooling

Subject: Computer and Technology noun /kəˈnɛk.ʃən ˈpuː.lɪŋ/ 1 definition

  1. Definition (noun)

    Entry #237 · Updated

    Connection Pooling is a resource-management technique in which a client application or proxy maintains a bounded cache of open network or database connections for reuse across multiple requests. Instead of paying the latency and CPU cost of establishing a new TCP socket, completing a TLS handshake, and authenticating on every operation, callers lease an idle connection from the pool and return it when finished. By enforcing pool size limits, idle timeouts, and health checks, connection pooling caps concurrent backend load and prevents resource exhaustion under heavy traffic.

    Common Forms

    • Client-Side (In-Process) Pooling: Managed directly inside an application's runtime or driver, minimizing lease latency while requiring careful per-instance sizing as services scale out.

    • Proxy-Based Pooling: Operated by an external intermediary service that consolidates connections from many application servers or serverless functions onto a smaller, bounded set of backend connections.

    • Session vs. Transaction Pooling: Controls lease duration for stateful backends, either dedicating a connection for an entire client session or returning it after each transaction to increase concurrency.

    • Stream-Multiplexed Pooling: Pairs connection reuse with multiplexed protocols (such as HTTP/2 or gRPC), allowing multiple in-flight requests to share a single pooled transport connection simultaneously.

    Example

    An e-commerce API service configures its PostgreSQL pool with a minimum of 10 and a maximum of 50 connections, avoiding roughly 30 ms of TCP, TLS, and authentication setup per query. During a flash sale generating 2,000 requests per second, application workers rapidly lease and return those 50 open connections while excess requests wait briefly in a queue rather than overwhelming the database.