Re: pgbouncer

From: Ben Chobot <bench(at)silentmedia(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: Rita <rmorgan466(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org >> PG-General Mailing List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: pgbouncer
Date: 2023-06-28 14:32:29
Message-ID: e0f45374-734d-ecdb-1948-89b1fc86e54a@silentmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Laurenz Albe wrote on 6/28/23 5:27 AM:
> On Wed, 2023-06-28 at 07:19 -0400, Rita wrote:
>> seems like I may need to deploy pgbouncer for my webapp. should i deploy it on the db server or on the webserver?
> On the database server. You don't want network latency between pgbouncer and PostgreSQL,
> so that the connections can be active as much as possible.
> That will improve throughput.

This is true, but as somebody who also deploys a fleet of stand-alone
pgBouncers in front of his dbs, a good reason to have a pgBouncer-based
traffic spigot before traffic hits your db server is that you can pause
traffic from the client to the db during maintenance, up to and
including replacing your entire db server, and all clients see is a
period of the db acting slow.

For applications that struggle with connection management, this can be
very valuable.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marc Millas 2023-06-28 15:22:12 need explanation about an explain plan
Previous Message Ben Chobot 2023-06-28 14:24:12 Re: typical active table count?