Skip to content

PgBouncer Connection Pooler

PgBouncer 1.26.0 on Ubuntu 24.04 LTS, set up as a PostgreSQL connection pooler that sits in front of your own PostgreSQL or Amazon RDS database. It requires TLS from clients, authenticates them with SCRAM-SHA-256, and listens on the instance itself until you choose to open it. This page covers what is on the image, its defaults and how billing works.

Launch on AWS Marketplace Getting started

What is on the image

  • PgBouncer 1.26.0, built from the official source release with OpenSSL and systemd support. PAM and LDAP are not built in.
  • A systemd service, pgbouncer, that runs as the unprivileged pgbouncer user.
  • First-boot setup that creates this instance's TLS certificates, random passwords for the app and pgbouncer users, the user list and the configuration file. Nothing secret is baked into the image.
  • The PostgreSQL client, psql, for testing connections.
  • A walkthrough script, /opt/sushi/docs/demo.sh, that checks pooling end to end against a temporary local database.

PostgreSQL server packages are on the image only so the walkthrough can start a throwaway database. The postgresql service is disabled, and the image is not meant to host your database.

Defaults

Setting Default
Listener 127.0.0.1:6432 (loopback only)
Client TLS Required
Client authentication SCRAM-SHA-256
Pool mode transaction
Example databases app (transaction pooling) and session (session pooling)
Backend TLS Required (encrypted, certificate not verified)
Limits 50 client connections, 2 server connections per pool

The example databases point at a temporary local backend that only the walkthrough uses. Point them at your own database before you use the pooler, see Point PgBouncer at your database.

t3.medium with an encrypted gp3 root volume of at least 16 GiB and at least 2 GiB of memory. No inbound security group rules are needed: you connect with AWS Systems Manager Session Manager.

Billing

You pay an hourly software fee while the instance runs, as shown in the offer terms on the listing. AWS bills EC2, EBS and data transfer separately. Your PostgreSQL or RDS database is billed on its own.

Where to go next

  • Getting started: subscribe, launch, connect and run your first pooled query.
  • Configuration: backends, pool modes, users, limits and network access.
  • Operations: security model, admin console, logs, backups and updates.
  • Troubleshooting: common errors and how to fix them.

Upstream project

PgBouncer is open source under the ISC license. See the PgBouncer documentation and its configuration reference. Software Sushi packages the image; the PgBouncer project does not endorse or support it.