From: Ben Chobot <bench@silentmedia.com>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Rita <rmorgan466@gmail.com>
Cc: " <pgsql-general@postgresql.org>
Subject: Re: pgbouncer
Date: Wed, 28 Jun 2023 07:32:29 -0700
Message-ID: <e0f45374-734d-ecdb-1948-89b1fc86e54a@silentmedia.com> (raw)
In-Reply-To: <133e7d3d127b430e61f80934eba44b5ba98eb51e.camel@cybertec.at>
References: <CAOF-KfgcE_UF=-1FO7DS8dMQQp0L1m1bhRYR4-ZYMuPEiBAs8A@mail.gmail.com>
<133e7d3d127b430e61f80934eba44b5ba98eb51e.camel@cybertec.at>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: bench@silentmedia.com, laurenz.albe@cybertec.at, rmorgan466@gmail.com
Subject: Re: pgbouncer
In-Reply-To: <e0f45374-734d-ecdb-1948-89b1fc86e54a@silentmedia.com>
References: <CAOF-KfgcE_UF=-1FO7DS8dMQQp0L1m1bhRYR4-ZYMuPEiBAs8A@mail.gmail.com> <133e7d3d127b430e61f80934eba44b5ba98eb51e.camel@cybertec.at> <e0f45374-734d-ecdb-1948-89b1fc86e54a@silentmedia.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox