PrepCity

Connection pooling

Open the lab

By the last page, this is the design you will have built. Drag it, or Show all, to see every part.

Lesson · 14 pages · about 13 min

Connection pooling

Opening a database connection costs round trips and a process. Pools reuse a few; Little's law and the core count size them; PgBouncer shares them across many servers, at the price of session state.

Words you’ll learn

  • Server
  • Request
  • PostgreSQL
  • Database
  • max_connections
  • Client
  • Outage
  • SCRAM
  • Backend process
  • Connection pool

Page by page