Azure Database for PostgreSQL – Hyperscale (Citus) connection pooling
Establishing new connections takes time. That works against most applications, which request many short-lived connections. We recommend using a connection pooler, both to reduce idle transactions and reuse existing connections. To learn more, visit our blog post.
You can run your own connection pooler, or use PgBouncer managed by Azure.
Connection poolers such as PgBouncer allow more clients to connect to the coordinator node at once. Applications connect to the pooler, and the pooler relays commands to the destination database.
When clients connect through PgBouncer, the number of connections that can actively run in the database doesn't change. Instead, PgBouncer queues excess connections and runs them when the database is ready.
Hyperscale (Citus) is now offering a managed instance of PgBouncer for server groups. It supports up to 2,000 simultaneous client connections. To connect through PgBouncer, follow these steps:
Go to the Connection strings page for your server group in the Azure portal.
Enable the checkbox PgBouncer connection strings. (The listed connection strings will change.)
Update client applications to connect with the new string.
Discover more about the limits and limitations of Hyperscale (Citus).