Thread: pgbouncer

pgbouncer

From
Mario Ignacio Rodríguez Cortés
Date:
hello all:

Well, i have a question if you know about this, i have a webserver in a
server and i have a database server, the question is: where should I
install the pgbouncer? in webserver, in database server or is the same?
whats your experience.

Thanks.

ISC: Mario Ignacio Rodríguez Cortés.

Re: pgbouncer

From
Merlin Moncure
Date:
On Thu, Jun 3, 2010 at 12:40 PM, Mario Ignacio Rodríguez Cortés
<ignacio.cortes@inegi.org.mx> wrote:
> hello all:
>
> Well, i have a question if you know about this, i have a webserver in a
> server and i have a database server, the question is: where should I
> install the pgbouncer? in webserver, in database server or is the same?
> whats your experience.

my gut (guess) says here that if the db and web server are on
different boxes, you will want to put pgbouncer on the web server box.
 my reasoning is that you have lots of libpq 'auths' going on to
pgbouncer and far fewer real auths to the database, so you want the
leg with the greater # of auths to get the local benefit.  reason #2
is the less going on in a dedicated db box the better.

I'm interested in this too...does anyone else have experience in this matter?

merlin

Re: pgbouncer

From
Vick Khera
Date:
On Thu, Jun 3, 2010 at 4:03 PM, Merlin Moncure <mmoncure@gmail.com> wrote:
> I'm interested in this too...does anyone else have experience in this matter?
>

I've pondered this many times.  My questions are what failure mode are
you looking to avoid, especially if you're using pgbouncer for load
balance in addition to connection pool.  I think the best spot in most
cases is the web server itself, but If the web server is dead, then
the pooler goes with it, whereas if the pooler is elsewhere you have
yet another point of failure when load balancing -- that is if db1
goes down and takes pgpool with it, db2 is unused and won't save your
app.

Re: pgbouncer

From
Dimitri Fontaine
Date:
Mario Ignacio Rodríguez Cortés <ignacio.cortes@inegi.org.mx> writes:
> Well, i have a question if you know about this, i have a webserver in a
> server and i have a database server, the question is: where should I
> install the pgbouncer? in webserver, in database server or is the same?
> whats your experience.

I always install an instance of pgbouncer per webserver, and sometimes I
also have another pgbouncer on the PostgreSQL box too.

I don't think I ever share a single pgbouncer for several web servers
directly though.

Regards,
--
dim