Skip to main content
Microsoft
separator
https://catalogartifact.azureedge.net/publicartifacts/cloudimg1647283583153.pgpool-ii-ubuntu-24-04-945c4044-809c-4efe-9287-9be944f39559/image6_logolarge.png

Pgpool-II with PostgreSQL 18 on Ubuntu 24.04 LTS

by cloudimg

Pooled PostgreSQL that keeps serving clients long after a plain database would refuse.

The connection wall, and what sits in front of it

PostgreSQL gives every client its own backend process. That design is excellent for throughput and unforgiving about client count: a connection heavy application, a serverless function that reconnects on every invocation, or a handful of application servers each holding their own pool will exhaust max_connections long before they exhaust CPU or memory. The failure is abrupt and unhelpful, a flat refusal that says too many clients already.

Pgpool-II sits in front of the database and keeps a small set of backend connections open, handing them to clients as they arrive and reusing them afterwards. The database sees a stable, bounded number of connections no matter how many clients turn up.

Measured on this image, not claimed for it

The backend is configured with max_connections of 50, and the pooler holds at most 32 backend connections. On a virtual machine launched from this image, 100 concurrent clients through the pooler were all served while the database held 33 connections. The same 100 clients sent straight at the database got 15 through and 61 refusals. Connection reuse is measurable too: 40 sequential sessions through the pooler landed on 24 database processes, where 40 direct sessions created 40. Every image ships a self test that reproduces this on demand, so you can confirm the behaviour on your own machine rather than take our word for it.

What is on, and what is not

This is a single node appliance and the listing says so plainly. Connection pooling is on and is the reason to run it. Load balancing is off, because there is one local backend and nothing to balance across. Streaming and native replication are off, so this is not a high availability cluster and should not be bought as one. The in memory query cache is off by default. The deployment guide documents how to add remote backends later, at which point load balancing and replication become meaningful.

Nothing shared between machines

The image contains no PostgreSQL cluster at all: no data directory, no cluster identifier, no stored password verifiers. Each virtual machine runs its own database initialisation on first boot and then generates its own superuser password, its own application role password, its own AES key and encrypted pooler password file, its own control protocol password and its own TLS certificate, writing them to a file only root can read. Two machines launched from this image were compared field by field and every one of fourteen identity bearing values differed. Secrets are handed to the tools that consume them on standard input, so none is written to the system journal or the process table.

The pooler answers on port 9999 and requires TLS: a connection that asks for an unencrypted session matches no host based authentication rule and is refused. There is no trust rule anywhere. Blank, postgres, password, pgpool and admin are all refused on both built in roles. PostgreSQL on 5432 and the control protocol on 9898 are bound to the loopback interface, so the pooler is the only data path into the machine and port 22 is the only other listener. Ubuntu 24.04 LTS is fully patched at build time with unattended security upgrades armed.

Pgpool-II is distributed under its own permissive BSD style licence and PostgreSQL under the PostgreSQL Licence. Pgpool-II is an independent project of the PgPool Global Development Group and PostgreSQL is an independent project; cloudimg is not affiliated with or endorsed by either.

At a glance

https://catalogartifact.azureedge.net/publicartifacts/cloudimg1647283583153.pgpool-ii-ubuntu-24-04-945c4044-809c-4efe-9287-9be944f39559/image0_screenshot01.png
https://catalogartifact.azureedge.net/publicartifacts/cloudimg1647283583153.pgpool-ii-ubuntu-24-04-945c4044-809c-4efe-9287-9be944f39559/image5_screenshot02.png
https://catalogartifact.azureedge.net/publicartifacts/cloudimg1647283583153.pgpool-ii-ubuntu-24-04-945c4044-809c-4efe-9287-9be944f39559/image8_screenshot03.png
https://catalogartifact.azureedge.net/publicartifacts/cloudimg1647283583153.pgpool-ii-ubuntu-24-04-945c4044-809c-4efe-9287-9be944f39559/image1_screenshot04.png
English (United States)
Your Privacy Choices Opt-Out Icon Your Privacy Choices
Consumer Health Privacy Sitemap Contact Us Privacy & Cookies Terms of Use About our ads Manage cookies