# Connection Pool

> Open links to a database that an app keeps ready. It uses them again.

**Field:** Software Development  
**Category:** Databases  
**Also known as:** Database Connection Pool, Connection Pooling

## Think of it like

Think of it like a row of shared bikes. You take one, ride, and put it back for the next person.

## Definition

A connection pool is a set of open links to a database that an app keeps ready. Opening a new one is slow, because both sides must shake hands and check passwords. With a pool, each request borrows a link and hands it back when it is done. It also caps how many links hit the database at once. PostgreSQL allows 100 by default, so the cap matters.

## Example

Lucy's app opened a new connection for each request and fell over at 100 users. A pool of 20 shared connections fixed it.

## Why it matters

Pools make each request fast. They also stop the database from drowning in links.

## Common mistake

Making the pool far too big. A database with too many connections at once gets slower, not faster.

## Three principles

- **Open once, reuse.** No handshake each time.
- **Borrow and return.** Each request hands it back.
- **A cap.** Limits the load on the database.

## Related terms

- [Database](https://learn.benibix.com/term/development/database)
- [PostgreSQL](https://learn.benibix.com/term/development/postgresql)
- [Database Query](https://learn.benibix.com/term/development/query)
- [Object-Relational Mapping (ORM)](https://learn.benibix.com/term/development/orm)

---

Source: https://learn.benibix.com/term/development/connection-pool
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
